From 5deff6c2dd14e328f97fa5a4f0fd384ed8dbf47b Mon Sep 17 00:00:00 2001 From: Saracen Date: Thu, 26 Oct 2023 21:43:08 +0100 Subject: [PATCH] Add foreign validation warning for rename actions. --- editor/scene_tree_dock.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 7968fdef558..59c91c68648 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -378,6 +378,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { break; } if (editor_selection->get_selected_node_list().size() > 1) { + if (!_validate_no_foreign()) { + break; + } rename_dialog->popup_centered(); } } break; @@ -388,6 +391,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { } Tree *tree = scene_tree->get_scene_tree(); if (tree->is_anything_selected()) { + if (!_validate_no_foreign()) { + break; + } tree->grab_focus(); tree->edit_selected(); }