Merge pull request #84022 from SaracenOne/validate_renames
Add foreign validation warning for rename actions.
This commit is contained in:
commit
dd74ffde95
1 changed files with 6 additions and 0 deletions
|
@ -378,6 +378,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (editor_selection->get_selected_node_list().size() > 1) {
|
if (editor_selection->get_selected_node_list().size() > 1) {
|
||||||
|
if (!_validate_no_foreign()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
rename_dialog->popup_centered();
|
rename_dialog->popup_centered();
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
@ -388,6 +391,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
|
||||||
}
|
}
|
||||||
Tree *tree = scene_tree->get_scene_tree();
|
Tree *tree = scene_tree->get_scene_tree();
|
||||||
if (tree->is_anything_selected()) {
|
if (tree->is_anything_selected()) {
|
||||||
|
if (!_validate_no_foreign()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
tree->grab_focus();
|
tree->grab_focus();
|
||||||
tree->edit_selected();
|
tree->edit_selected();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue