mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix another crash in the Tag Browser
This commit is contained in:
parent
cc0aee27f5
commit
2395ef8112
@ -571,6 +571,9 @@ class TagsView(QTreeView): # {{{
|
||||
def show_item_at_index(self, idx, box=False,
|
||||
position=QTreeView.PositionAtCenter):
|
||||
if idx.isValid() and idx.data(Qt.UserRole).toPyObject() is not self._model.root_item:
|
||||
self.setExpanded(idx, True) # Needed otherwise Qt segfaults if the
|
||||
# node is buried in a collapsed, off
|
||||
# screen hierarchy
|
||||
self.setCurrentIndex(idx)
|
||||
self.scrollTo(idx, position)
|
||||
self.setCurrentIndex(idx)
|
||||
|
Loading…
x
Reference in New Issue
Block a user