mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
HierarchicalView collapse all except project on project load
This commit is contained in:
parent
2a4b4ebdd2
commit
300c7a2c30
1 changed files with 7 additions and 0 deletions
|
|
@ -156,6 +156,13 @@ class HierarchyView(QtWidgets.QTreeView):
|
|||
# Trigger update of model after all data for delegates are filled
|
||||
self._source_model.set_project(project_name)
|
||||
|
||||
self.collapseAll()
|
||||
|
||||
project_item = self._source_model.project_item
|
||||
if project_item:
|
||||
index = self._source_model.index_for_item(project_item)
|
||||
self.expand(index)
|
||||
|
||||
def _on_rows_moved(self, index):
|
||||
parent_index = index.parent()
|
||||
if not self.isExpanded(parent_index):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue