Merge pull request #71024 from marzecdawid/better-cursor-behaviour-in-tree-with-ctrl
Fix cursor behavior for multiselect in Tree while holding CTRL
This commit is contained in:
commit
a12d9df9e1
2 changed files with 29 additions and 28 deletions
|
|
@ -1114,9 +1114,15 @@ void SceneTreeEditor::_update_selection(TreeItem *item) {
|
|||
}
|
||||
|
||||
if (editor_selection->is_selected(n)) {
|
||||
item->select(0);
|
||||
if (!item->is_selected(0)) {
|
||||
item->select(0);
|
||||
}
|
||||
} else {
|
||||
item->deselect(0);
|
||||
if (item->is_selected(0)) {
|
||||
TreeItem *previous_cursor_item = tree->get_selected();
|
||||
item->deselect(0);
|
||||
previous_cursor_item->set_as_cursor(0);
|
||||
}
|
||||
}
|
||||
|
||||
TreeItem *c = item->get_first_child();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue