Skip to content

Commit

Permalink
Merge pull request #84022 from SaracenOne/validate_renames
Browse files Browse the repository at this point in the history
Add foreign validation warning for rename actions.
  • Loading branch information
akien-mga committed Oct 27, 2023
2 parents 090f616 + 5deff6c commit dd74ffd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions editor/scene_tree_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
}
Expand Down

0 comments on commit dd74ffd

Please sign in to comment.