Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add foreign validation warning for rename actions. #84022

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

SaracenOne
Copy link
Member

Add missing validation checks for renaming foreign nodes, both regular renames and batch renames. Will prevent disallowed node renaming when using shortcuts.

editor/scene_tree_dock.cpp Outdated Show resolved Hide resolved
@@ -386,6 +389,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
if (!profile_allow_editing) {
break;
}
if (!_validate_no_foreign()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously this would fail silently instead, so this only adds a warning without preventing anything new. Although is useful for #69087

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been updated now to be inside the 'is_anything_selected' check, but yes, it doesn't prevent anything new, but it does make its behaviour consistent with the other actions in providing explicit feedback when a rename check fails.

Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The batch rename warning can be tweaked (see comment), but otherwise it's fine.

@SaracenOne
Copy link
Member Author

Updated to put the warning after the selection checks for both actions.

@akien-mga akien-mga merged commit dd74ffd into godotengine:master Oct 27, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants