mirror of
https://github.com/ankitects/anki.git
synced 2025-12-12 22:36:55 -05:00
Handle failure in CardLayout/accept()
This commit is contained in:
parent
e9309c5378
commit
db9594818a
1 changed files with 2 additions and 1 deletions
|
|
@ -30,6 +30,7 @@ from aqt.utils import (
|
||||||
saveSplitter,
|
saveSplitter,
|
||||||
shortcut,
|
shortcut,
|
||||||
showInfo,
|
showInfo,
|
||||||
|
showWarning,
|
||||||
tooltip,
|
tooltip,
|
||||||
tr,
|
tr,
|
||||||
)
|
)
|
||||||
|
|
@ -791,7 +792,7 @@ class CardLayout(QDialog):
|
||||||
|
|
||||||
update_notetype_legacy(parent=self.mw, notetype=self.model).success(
|
update_notetype_legacy(parent=self.mw, notetype=self.model).success(
|
||||||
on_done
|
on_done
|
||||||
).run_in_background()
|
).failure(lambda e: showWarning(str(e))).run_in_background()
|
||||||
|
|
||||||
def reject(self) -> None:
|
def reject(self) -> None:
|
||||||
if self.change_tracker.changed():
|
if self.change_tracker.changed():
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue