mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 08:54:53 +01:00
clear selection on adding new item
This commit is contained in:
parent
675aac1932
commit
db10512a30
1 changed files with 10 additions and 2 deletions
|
|
@ -280,7 +280,11 @@ class HierarchyView(QtWidgets.QTreeView):
|
|||
new_index.row(), 1, new_index.parent()
|
||||
)
|
||||
# Change current index
|
||||
self.setCurrentIndex(task_type_index)
|
||||
self.selectionModel().setCurrentIndex(
|
||||
task_type_index,
|
||||
QtCore.QItemSelectionModel.Clear
|
||||
| QtCore.QItemSelectionModel.Select
|
||||
)
|
||||
# Start editing
|
||||
self.edit(task_type_index)
|
||||
|
||||
|
|
@ -298,7 +302,11 @@ class HierarchyView(QtWidgets.QTreeView):
|
|||
return
|
||||
|
||||
# Change current index
|
||||
self.setCurrentIndex(new_index)
|
||||
self.selectionModel().setCurrentIndex(
|
||||
new_index,
|
||||
QtCore.QItemSelectionModel.Clear
|
||||
| QtCore.QItemSelectionModel.Select
|
||||
)
|
||||
# Start editing
|
||||
self.edit(new_index)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue