Merge pull request #84022 from SaracenOne/validate_renames

Add foreign validation warning for rename actions.
This commit is contained in:
Rémi Verschelde 2023-10-27 11:39:20 +02:00
commit dd74ffde95
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 6 additions and 0 deletions

View File

@ -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();
}