mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 19:03:39 +02:00
Fix #1894742 [[Enhancement] Show warning before closing Edit this recipe dialog](https://bugs.launchpad.net/calibre/+bug/1894742)
This commit is contained in:
parent
6c32ac44e6
commit
730fe50516
1 changed files with 3 additions and 1 deletions
|
|
@ -14,6 +14,7 @@
|
|||
QToolButton, QTreeView)
|
||||
|
||||
from calibre.gui2 import error_dialog, open_local_file, choose_files, choose_save_file
|
||||
from calibre.gui2.dialogs.confirm_delete import confirm as confirm_delete
|
||||
from calibre.gui2.widgets2 import Dialog
|
||||
from calibre.web.feeds.recipes import custom_recipes, compile_recipe
|
||||
from calibre.gui2.tweak_book.editor.text import TextEdit
|
||||
|
|
@ -607,7 +608,8 @@ def accept(self):
|
|||
def reject(self):
|
||||
idx = self.stack.currentIndex()
|
||||
if idx > 0:
|
||||
self.stack.setCurrentIndex(0)
|
||||
if confirm_delete(_('Are you sure? Any unsaved changes will be lost.'), 'confirm-cancel-edit-custom-recipe'):
|
||||
self.stack.setCurrentIndex(0)
|
||||
return
|
||||
Dialog.reject(self)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue