Ensure setSelectedhandle also makes the item visible in the scroll view
This commit is contained in:
@@ -485,6 +485,11 @@ class GuiDocTree(QTreeWidget):
|
|||||||
if tHandle in self.theMap:
|
if tHandle in self.theMap:
|
||||||
self.clearSelection()
|
self.clearSelection()
|
||||||
self.theMap[tHandle].setSelected(True)
|
self.theMap[tHandle].setSelected(True)
|
||||||
|
selItems = self.selectedIndexes()
|
||||||
|
if selItems:
|
||||||
|
self.scrollTo(
|
||||||
|
selItems[0], QAbstractItemView.PositionAtCenter
|
||||||
|
)
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user