You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #110738 from YeldhamDev/oops_guess_we_needed_that
Fix selection of remote tree using the keyboard
This commit is contained in:
@@ -66,6 +66,7 @@ void EditorDebuggerTree::_notification(int p_what) {
|
||||
case NOTIFICATION_POSTINITIALIZE: {
|
||||
set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
|
||||
connect("cell_selected", callable_mp(this, &EditorDebuggerTree::_scene_tree_selected));
|
||||
connect("multi_selected", callable_mp(this, &EditorDebuggerTree::_scene_tree_selection_changed));
|
||||
connect("nothing_selected", callable_mp(this, &EditorDebuggerTree::_scene_tree_nothing_selected));
|
||||
connect("item_collapsed", callable_mp(this, &EditorDebuggerTree::_scene_tree_folded));
|
||||
@@ -85,6 +86,27 @@ void EditorDebuggerTree::_bind_methods() {
|
||||
ADD_SIGNAL(MethodInfo("open"));
|
||||
}
|
||||
|
||||
void EditorDebuggerTree::_scene_tree_selected() {
|
||||
TreeItem *item = get_selected();
|
||||
if (!item) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!inspected_object_ids.is_empty()) {
|
||||
inspected_object_ids.clear();
|
||||
deselect_all();
|
||||
item->select(0);
|
||||
}
|
||||
|
||||
uint64_t id = uint64_t(item->get_metadata(0));
|
||||
inspected_object_ids.append(id);
|
||||
|
||||
if (!notify_selection_queued) {
|
||||
callable_mp(this, &EditorDebuggerTree::_notify_selection_changed).call_deferred();
|
||||
notify_selection_queued = true;
|
||||
}
|
||||
}
|
||||
|
||||
void EditorDebuggerTree::_scene_tree_selection_changed(TreeItem *p_item, int p_column, bool p_selected) {
|
||||
if (updating_scene_tree || !p_item) {
|
||||
return;
|
||||
|
||||
@@ -73,6 +73,7 @@ private:
|
||||
String last_filter;
|
||||
|
||||
void _scene_tree_folded(Object *p_obj);
|
||||
void _scene_tree_selected();
|
||||
void _scene_tree_selection_changed(TreeItem *p_item, int p_column, bool p_selected);
|
||||
void _scene_tree_nothing_selected();
|
||||
void _notify_selection_changed();
|
||||
|
||||
Reference in New Issue
Block a user