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:
Olivier 2017-10-11 08:50:22 +02:00 committed by GitHub
commit ab9c95cc6d

View file

@ -101,7 +101,9 @@ class collapsibleDockWidgets(QToolBar):
def restoreState(self, state):
for group, title, status in state:
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)
widget.setVisible(status)