Disable expand on double click in search mode
This commit is contained in:
parent
3f772ce0fe
commit
a9ea7e39ae
@ -399,11 +399,14 @@ class SidebarTreeView(QTreeView):
|
|||||||
if tool == SidebarTool.SEARCH:
|
if tool == SidebarTool.SEARCH:
|
||||||
selection_mode = QAbstractItemView.SingleSelection
|
selection_mode = QAbstractItemView.SingleSelection
|
||||||
drag_drop_mode = QAbstractItemView.NoDragDrop
|
drag_drop_mode = QAbstractItemView.NoDragDrop
|
||||||
|
double_click_expands = False
|
||||||
else:
|
else:
|
||||||
selection_mode = QAbstractItemView.ExtendedSelection
|
selection_mode = QAbstractItemView.ExtendedSelection
|
||||||
drag_drop_mode = QAbstractItemView.InternalMove
|
drag_drop_mode = QAbstractItemView.InternalMove
|
||||||
|
double_click_expands = True
|
||||||
self.setSelectionMode(selection_mode)
|
self.setSelectionMode(selection_mode)
|
||||||
self.setDragDropMode(drag_drop_mode)
|
self.setDragDropMode(drag_drop_mode)
|
||||||
|
self.setExpandsOnDoubleClick(double_click_expands)
|
||||||
|
|
||||||
def model(self) -> SidebarModel:
|
def model(self) -> SidebarModel:
|
||||||
return super().model()
|
return super().model()
|
||||||
|
Loading…
Reference in New Issue
Block a user