1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-23 15:16:17 +00:00

Fix cursor behaviour in Tree while holding CTRL

This commit is contained in:
Dawid Marzec
2023-01-06 20:19:34 +01:00
parent 28a60b3de0
commit 9abbdea95e
2 changed files with 29 additions and 28 deletions

View File

@@ -1100,9 +1100,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();