mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-04 13:02:36 +12:00
Fix inconsistency of button states when searching in metadata
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
This commit is contained in:
parent
3ac87d9125
commit
eeb98a8ccd
|
@ -93,6 +93,11 @@ class collapsibleDockWidgets(QToolBar):
|
|||
# btn.defaultAction().setChecked(event.type() == QEvent.Show)
|
||||
# return False
|
||||
|
||||
def switchActionByWidget(self, widget, visibility=True):
|
||||
for _btn, _action, _widget, _grp in self.otherWidgets:
|
||||
if widget == _widget:
|
||||
_btn.setChecked(visibility)
|
||||
|
||||
def setCurrentGroup(self, group):
|
||||
self.currentGroup = group
|
||||
for btn, action, widget, grp in self.otherWidgets:
|
||||
|
|
|
@ -38,8 +38,7 @@ class outlineSearchResultHighlighter(abstractSearchResultHighlighter):
|
|||
# Metadata columns are inside a splitter widget that my be hidden, so we show them.
|
||||
if parentName:
|
||||
metadataViewWidget = mainWindow().findChild(metadataView, "redacMetadata")
|
||||
metadataViewWidget.show()
|
||||
metadataViewWidget.findChild(collapsibleGroupBox2, parentName).button.setChecked(True)
|
||||
mainWindow().toolbar.switchActionByWidget(metadataViewWidget)
|
||||
widget = metadataViewWidget.findChild(editorClass, editorName)
|
||||
else:
|
||||
widget = mainWindow().mainEditor.currentEditor().findChild(editorClass, editorName)
|
||||
|
|
Loading…
Reference in a new issue