You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Merge pull request #99680 from YeldhamDev/multi_remote_selection
Allow to select multiple remote nodes at runtime
This commit is contained in:
@@ -2546,12 +2546,13 @@ void EditorNode::_edit_current(bool p_skip_foreign, bool p_skip_inspector_update
|
||||
InspectorDock::get_inspector_singleton()->edit(nullptr);
|
||||
NodeDock::get_singleton()->set_node(nullptr);
|
||||
InspectorDock::get_singleton()->update(nullptr);
|
||||
EditorDebuggerNode::get_singleton()->clear_remote_tree_selection();
|
||||
hide_unused_editors();
|
||||
return;
|
||||
}
|
||||
|
||||
// Update the use folding setting and state.
|
||||
bool disable_folding = bool(EDITOR_GET("interface/inspector/disable_folding")) || current_obj->is_class("EditorDebuggerRemoteObject");
|
||||
bool disable_folding = bool(EDITOR_GET("interface/inspector/disable_folding")) || current_obj->is_class("EditorDebuggerRemoteObjects");
|
||||
if (InspectorDock::get_inspector_singleton()->is_using_folding() == disable_folding) {
|
||||
InspectorDock::get_inspector_singleton()->set_use_folding(!disable_folding, false);
|
||||
}
|
||||
@@ -2579,6 +2580,7 @@ void EditorNode::_edit_current(bool p_skip_foreign, bool p_skip_inspector_update
|
||||
SceneTreeDock::get_singleton()->set_selected(nullptr);
|
||||
NodeDock::get_singleton()->set_node(nullptr);
|
||||
InspectorDock::get_singleton()->update(nullptr);
|
||||
EditorDebuggerNode::get_singleton()->clear_remote_tree_selection();
|
||||
ImportDock::get_singleton()->set_edit_path(current_res->get_path());
|
||||
}
|
||||
|
||||
@@ -2618,6 +2620,7 @@ void EditorNode::_edit_current(bool p_skip_foreign, bool p_skip_inspector_update
|
||||
SceneTreeDock::get_singleton()->set_selected(nullptr);
|
||||
InspectorDock::get_singleton()->update(nullptr);
|
||||
}
|
||||
EditorDebuggerNode::get_singleton()->clear_remote_tree_selection();
|
||||
|
||||
if (get_edited_scene() && !get_edited_scene()->get_scene_file_path().is_empty()) {
|
||||
String source_scene = get_edited_scene()->get_scene_file_path();
|
||||
@@ -2626,7 +2629,6 @@ void EditorNode::_edit_current(bool p_skip_foreign, bool p_skip_inspector_update
|
||||
info_is_warning = true;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
Node *selected_node = nullptr;
|
||||
|
||||
@@ -2652,6 +2654,10 @@ void EditorNode::_edit_current(bool p_skip_foreign, bool p_skip_inspector_update
|
||||
}
|
||||
}
|
||||
|
||||
if (!current_obj->is_class("EditorDebuggerRemoteObjects")) {
|
||||
EditorDebuggerNode::get_singleton()->clear_remote_tree_selection();
|
||||
}
|
||||
|
||||
InspectorDock::get_inspector_singleton()->edit(current_obj);
|
||||
NodeDock::get_singleton()->set_node(nullptr);
|
||||
SceneTreeDock::get_singleton()->set_selected(selected_node);
|
||||
@@ -4945,7 +4951,8 @@ Ref<Texture2D> EditorNode::get_object_icon(const Object *p_object, const String
|
||||
|
||||
Ref<Script> scr = p_object->get_script();
|
||||
|
||||
if (Object::cast_to<EditorDebuggerRemoteObject>(p_object)) {
|
||||
const EditorDebuggerRemoteObjects *robjs = Object::cast_to<EditorDebuggerRemoteObjects>(p_object);
|
||||
if (robjs) {
|
||||
String class_name;
|
||||
if (scr.is_valid()) {
|
||||
class_name = scr->get_global_name();
|
||||
@@ -4955,7 +4962,12 @@ Ref<Texture2D> EditorNode::get_object_icon(const Object *p_object, const String
|
||||
class_name = scr->get_path();
|
||||
}
|
||||
}
|
||||
return get_class_icon(class_name.is_empty() ? Object::cast_to<EditorDebuggerRemoteObject>(p_object)->type_name : class_name, p_fallback);
|
||||
|
||||
if (class_name.is_empty()) {
|
||||
return get_class_icon(robjs->type_name, p_fallback);
|
||||
}
|
||||
|
||||
return get_class_icon(class_name, p_fallback);
|
||||
}
|
||||
|
||||
if (scr.is_null() && p_object->is_class("Script")) {
|
||||
|
||||
Reference in New Issue
Block a user