File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 36
36
from PyQt5 .QtWidgets import *
37
37
from PyQt5 .QtGui import QIcon
38
38
39
+ from classes import info
39
40
from classes import ui_util
40
41
from classes .app import get_app
41
42
from classes .metrics import *
@@ -979,6 +980,17 @@ def accept(self):
979
980
super (Export , self ).accept ()
980
981
981
982
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
+
982
994
# Re-set OMP thread enabled flag
983
995
if self .s .get ("omp_threads_enabled" ):
984
996
openshot .Settings .Instance ().WAIT_FOR_VIDEO_PROCESSING_TASK = False
You can’t perform that action at this time.
0 commit comments