added some kind of check of editability

This commit is contained in:
iLLiCiTiT 2021-04-23 13:41:38 +02:00
parent e88f7c3e33
commit f32cd5ced5
2 changed files with 9 additions and 1 deletions

View file

@ -589,6 +589,10 @@ class AssetItem(BaseItem):
class TaskItem(BaseItem):
columns = [
"name",
"type"
]
@classmethod
def name_icon(cls):
if cls._name_icon is None:

View file

@ -92,7 +92,11 @@ class HierarchyView(QtWidgets.QTreeView):
if key not in self.persistent_columns:
continue
col_index = self._source_model.index(row, column, parent_index)
self.openPersistentEditor(col_index)
if bool(
self._source_model.flags(col_index)
& QtCore.Qt.ItemIsEditable
):
self.openPersistentEditor(col_index)
# Expand parent on insert
if not self.isExpanded(parent_index):