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.
This commit is contained in:
Abdo 2022-11-21 03:18:59 +03:00 committed by GitHub
parent ad4acf90ef
commit 05b5abb856
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -137,6 +137,7 @@ class Browser(QMainWindow):
self.setupMenus() self.setupMenus()
self.setupHooks() self.setupHooks()
self.setupEditor() self.setupEditor()
gui_hooks.browser_will_show(self)
# restoreXXX() should be called after all child widgets have been created # restoreXXX() should be called after all child widgets have been created
# and attached to QMainWindow # and attached to QMainWindow
@ -156,7 +157,6 @@ class Browser(QMainWindow):
self.on_undo_state_change(mw.undo_actions_info()) self.on_undo_state_change(mw.undo_actions_info())
# legacy alias # legacy alias
self.model = MockModel(self) self.model = MockModel(self)
gui_hooks.browser_will_show(self)
self.setupSearch(card, search) self.setupSearch(card, search)
self.show() self.show()