From 05b5abb85627f42f5dd8018ef6fb5b0a41984b7b Mon Sep 17 00:00:00 2001 From: Abdo Date: Mon, 21 Nov 2022 03:18:59 +0300 Subject: [PATCH] Call browser_will_show before restoring state (#2198) This is to fix a recent issue that started to appear in the Fastbar add-on where the layout of the toolbar is broken. --- qt/aqt/browser/browser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/aqt/browser/browser.py b/qt/aqt/browser/browser.py index 323072621..c13d37161 100644 --- a/qt/aqt/browser/browser.py +++ b/qt/aqt/browser/browser.py @@ -137,6 +137,7 @@ class Browser(QMainWindow): self.setupMenus() self.setupHooks() self.setupEditor() + gui_hooks.browser_will_show(self) # restoreXXX() should be called after all child widgets have been created # and attached to QMainWindow @@ -156,7 +157,6 @@ class Browser(QMainWindow): self.on_undo_state_change(mw.undo_actions_info()) # legacy alias self.model = MockModel(self) - gui_hooks.browser_will_show(self) self.setupSearch(card, search) self.show()