Skip to content

Ignore rename shortcut when Remote tab is active #106688

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

Merged
merged 1 commit into from
Jun 9, 2025

Conversation

sakubou
Copy link
Contributor

@sakubou sakubou commented May 21, 2025

Fixes #106306

In shortcut_input(), an early exit is now taken if edit_remote->is_pressed(), skipping all local-node shortcuts (e.g. rename, delete, cut).

@sakubou sakubou requested a review from a team as a code owner May 21, 2025 17:50
@AThousandShips AThousandShips added bug topic:editor cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release labels May 22, 2025
@AThousandShips AThousandShips added this to the 4.5 milestone May 22, 2025
@KoBeWi
Copy link
Member

KoBeWi commented Jun 2, 2025

IMO blocking every shortcut is too much. Right now you can e.g. select nodes in 2D editor and delete them, and it will be synced with the running project. Selecting a node will deselect any selected remote node, and show the selected node in the inspector, so I think this behavior is fine.
Also some shortcuts are still actove, like Add Node (Ctrl+A).

The main problem here is that renaming a node with visible remote tree is broken. The popup appears at wrong position and the rename takes no effect.
Either the rename should be blocked (only), or the local tree should automatically appear on rename.

@sakubou sakubou force-pushed the 106306-ignore-f2-in-remote-tab branch from 56ffb78 to 6896a76 Compare June 3, 2025 03:24
@sakubou
Copy link
Contributor Author

sakubou commented Jun 3, 2025

Okay understood! I’ve adjusted it to solely block the rename shortcut.

@@ -184,6 +184,9 @@ void SceneTreeDock::shortcut_input(const Ref<InputEvent> &p_event) {
if (focus_owner && (Object::cast_to<BaseButton>(focus_owner) || Object::cast_to<Range>(focus_owner))) {
return;
}
if (edit_remote->is_pressed()) {
Copy link
Member

Choose a reason for hiding this comment

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

Could probably use a comment.

@Repiteo Repiteo merged commit 18b849c into godotengine:master Jun 9, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Jun 9, 2025

Thanks!

@KoBeWi KoBeWi changed the title Disable local-node shortcuts when Remote tab is active in SceneTreeDock Ignore rename shortcut when Remote tab is active Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release topic:editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

It is possible to make changes in the tree while the game is running
4 participants