Skip to content

Commit 1e0ecf3

Browse files
authored
Merge branch 'develop' into pending
2 parents c7d0692 + d039709 commit 1e0ecf3

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
lines changed

src/classes/app.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ def __init__(self, *args, mode=None):
231231
# Auto load project passed as argument
232232
self.window.OpenProjectSignal.emit(path)
233233
else:
234-
# Auto import media file
234+
# Apply the default settings and Auto import media file
235+
self.project.load("")
235236
self.window.filesTreeView.add_file(path)
236237
else:
237238
# Recover backup file (this can't happen until after the Main Window has completely loaded)

src/classes/updates.py

+6
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ def reset(self):
196196
self.pending_action = None
197197
self.last_action = None
198198

199+
# Notify watchers of new history state
200+
self.update_watchers()
201+
199202
def add_listener(self, listener, index=-1):
200203
""" Add a new listener (which will invoke the changed(action) method
201204
each time an UpdateAction is available). """
@@ -371,3 +374,6 @@ def apply_last_action_to_history(self, previous_value):
371374
self.actionHistory.append(self.pending_action)
372375
self.last_action = self.pending_action
373376
self.pending_action = None
377+
378+
# Notify watchers of new history state
379+
self.update_watchers()

src/windows/export.py

+12
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
from PyQt5.QtWidgets import *
3737
from PyQt5.QtGui import QIcon
3838

39+
from classes import info
3940
from classes import ui_util
4041
from classes.app import get_app
4142
from classes.metrics import *
@@ -979,6 +980,17 @@ def accept(self):
979980
super(Export, self).accept()
980981

981982
def reject(self):
983+
if self.exporting and not self.close_button.isVisible():
984+
# Show confirmation dialog
985+
_ = get_app()._tr
986+
result = QMessageBox.question(self,
987+
_("Export Video"),
988+
_("Are you sure you want to cancel the export?"),
989+
QMessageBox.No | QMessageBox.Yes)
990+
if result == QMessageBox.No:
991+
# Resume export
992+
return
993+
982994
# Re-set OMP thread enabled flag
983995
if self.s.get("omp_threads_enabled"):
984996
openshot.Settings.Instance().WAIT_FOR_VIDEO_PROCESSING_TASK = False

src/windows/main_window.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
import platform
3333
import shutil
3434
import webbrowser
35+
from time import sleep
3536
from operator import itemgetter
3637
from uuid import uuid4
3738
from copy import deepcopy
38-
from time import sleep, time
3939

4040
from PyQt5.QtCore import *
4141
from PyQt5.QtGui import QIcon, QCursor, QKeySequence
@@ -617,6 +617,8 @@ def actionSave_trigger(self, event):
617617

618618
def auto_save_project(self):
619619
"""Auto save the project"""
620+
import time
621+
620622
app = get_app()
621623
s = settings.get_settings()
622624

@@ -634,7 +636,7 @@ def auto_save_project(self):
634636
file_name, file_ext = os.path.splitext(file_name)
635637

636638
# Make copy of unsaved project file in 'recovery' folder
637-
recover_path_with_timestamp = os.path.join(info.RECOVERY_PATH, "%d-%s.osp" % (int(time()), file_name))
639+
recover_path_with_timestamp = os.path.join(info.RECOVERY_PATH, "%d-%s.osp" % (int(time.time()), file_name))
638640
shutil.copy(file_path, recover_path_with_timestamp)
639641

640642
# Find any recovery file older than X auto-saves

0 commit comments

Comments
 (0)