mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
reversed block signals
This commit is contained in:
parent
afc1fa9a13
commit
f02f11750c
2 changed files with 0 additions and 32 deletions
|
|
@ -264,8 +264,6 @@ class HierarchyModel(QtCore.QAbstractItemModel):
|
||||||
if not project_doc:
|
if not project_doc:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.blockSignals(True)
|
|
||||||
|
|
||||||
# Create project item
|
# Create project item
|
||||||
project_item = ProjectItem(project_doc)
|
project_item = ProjectItem(project_doc)
|
||||||
self.add_item(project_item)
|
self.add_item(project_item)
|
||||||
|
|
@ -379,8 +377,6 @@ class HierarchyModel(QtCore.QAbstractItemModel):
|
||||||
|
|
||||||
self.add_items(task_items, asset_item)
|
self.add_items(task_items, asset_item)
|
||||||
|
|
||||||
self.blockSignals(False)
|
|
||||||
|
|
||||||
# Emit that project was successfully changed
|
# Emit that project was successfully changed
|
||||||
self.project_changed.emit()
|
self.project_changed.emit()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -213,34 +213,6 @@ class HierarchyView(QtWidgets.QTreeView):
|
||||||
index = self._source_model.index_for_item(project_item)
|
index = self._source_model.index_for_item(project_item)
|
||||||
self.expand(index)
|
self.expand(index)
|
||||||
|
|
||||||
self._open_persistent_editors_on_project_refresh()
|
|
||||||
|
|
||||||
def _open_persistent_editors_on_project_refresh(self):
|
|
||||||
model = self._source_model
|
|
||||||
parent_index = QtCore.QModelIndex()
|
|
||||||
persistent_queue = collections.deque()
|
|
||||||
persistent_queue.append((parent_index, model.rowCount()))
|
|
||||||
while persistent_queue:
|
|
||||||
item = persistent_queue.popleft()
|
|
||||||
parent_index, rows = item
|
|
||||||
if not rows:
|
|
||||||
continue
|
|
||||||
|
|
||||||
for row in range(rows):
|
|
||||||
row_index = model.index(row, 0, parent_index)
|
|
||||||
persistent_queue.append(
|
|
||||||
(row_index, model.rowCount(row_index))
|
|
||||||
)
|
|
||||||
for key, column in self._column_key_to_index.items():
|
|
||||||
if key not in self.persistent_columns:
|
|
||||||
continue
|
|
||||||
col_index = model.index(row, column, parent_index)
|
|
||||||
if bool(
|
|
||||||
model.flags(col_index)
|
|
||||||
& QtCore.Qt.ItemIsEditable
|
|
||||||
):
|
|
||||||
self.openPersistentEditor(col_index)
|
|
||||||
|
|
||||||
def _on_rows_moved(self, index):
|
def _on_rows_moved(self, index):
|
||||||
parent_index = index.parent()
|
parent_index = index.parent()
|
||||||
if not self.isExpanded(parent_index):
|
if not self.isExpanded(parent_index):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue