From 935fbb6289c5ab7c9bec03c8f676ab27dd478677 Mon Sep 17 00:00:00 2001 From: RumovZ Date: Thu, 27 May 2021 16:51:03 +0200 Subject: [PATCH] Use implicit failure handling and self as parent --- qt/aqt/clayout.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qt/aqt/clayout.py b/qt/aqt/clayout.py index 8b322de10..592b00965 100644 --- a/qt/aqt/clayout.py +++ b/qt/aqt/clayout.py @@ -30,7 +30,6 @@ from aqt.utils import ( saveSplitter, shortcut, showInfo, - showWarning, tooltip, tr, ) @@ -790,9 +789,9 @@ class CardLayout(QDialog): gui_hooks.sidebar_should_refresh_notetypes() QDialog.accept(self) - update_notetype_legacy(parent=self.mw, notetype=self.model).success( + update_notetype_legacy(parent=self, notetype=self.model).success( on_done - ).failure(lambda e: showWarning(str(e))).run_in_background() + ).run_in_background() def reject(self) -> None: if self.change_tracker.changed():