|
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,19 +980,15 @@ def accept(self):
|
979 | 980 | super(Export, self).accept()
|
980 | 981 |
|
981 | 982 | def reject(self):
|
982 |
| - # Handle cancel |
983 | 983 | if self.exporting and not self.close_button.isVisible():
|
| 984 | + # Show confirmation dialog |
984 | 985 | _ = get_app()._tr
|
985 |
| - ret = QMessageBox(self) |
986 |
| - ret.setIcon(QMessageBox.Question) |
987 |
| - ret.setWindowTitle(_("Video Export")) |
988 |
| - ret.setText(_("Are you sure you want to abort the video export?")) |
989 |
| - ret.addButton(_("Yes"), QMessageBox.AcceptRole) |
990 |
| - button_No = QPushButton(_("No")) |
991 |
| - ret.addButton(button_No, QMessageBox.RejectRole) |
992 |
| - ret.setDefaultButton(button_No) |
993 |
| - ret.exec_() |
994 |
| - if ret.clickedButton() == button_No: |
| 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 |
995 | 992 | return
|
996 | 993 |
|
997 | 994 | # Re-set OMP thread enabled flag
|
|
0 commit comments