mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
added _add_task to hierarchy view
This commit is contained in:
parent
f561e1a864
commit
0a273b2304
1 changed files with 8 additions and 3 deletions
|
|
@ -257,11 +257,16 @@ class HierarchyView(QtWidgets.QTreeView):
|
|||
self._source_model.remove_index(index)
|
||||
|
||||
def _on_ctrl_shift_enter_pressed(self):
|
||||
index = self.currentIndex()
|
||||
if not index.isValid():
|
||||
self._add_task()
|
||||
|
||||
def _add_task(self, parent_index=None):
|
||||
if parent_index is None:
|
||||
parent_index = self.currentIndex()
|
||||
|
||||
if not parent_index.isValid():
|
||||
return
|
||||
|
||||
new_index = self._source_model.add_new_task(index)
|
||||
new_index = self._source_model.add_new_task(parent_index)
|
||||
if new_index is None:
|
||||
return
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue