mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-09-29 17:01:23 +13:00
Merge pull request #136 from gedakc/fix-fail-to-load-last-state-of-panels
Fixes: Manuskript fails to load last state of panels
This commit is contained in:
commit
ab9c95cc6d
1 changed files with 3 additions and 1 deletions
|
@ -101,7 +101,9 @@ class collapsibleDockWidgets(QToolBar):
|
||||||
def restoreState(self, state):
|
def restoreState(self, state):
|
||||||
for group, title, status in state:
|
for group, title, status in state:
|
||||||
for btn, act, widget, grp in self.otherWidgets:
|
for btn, act, widget, grp in self.otherWidgets:
|
||||||
if group == grp and title == btn.text():
|
# Strip '&' from both title and btn.text() to improve matching because
|
||||||
|
# title contains "&" shortcut character whereas btn.text() does not.
|
||||||
|
if group == grp and title.replace('&', '') == btn.text().replace('&', ''):
|
||||||
btn.setChecked(status)
|
btn.setChecked(status)
|
||||||
widget.setVisible(status)
|
widget.setVisible(status)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue