1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Merge pull request #104213 from ryevdokimov/shortcuts-gridmap-mouse-captrued

Fix `GridMap` shortcuts being triggered during freelook (mouse captured)
This commit is contained in:
Thaddeus Crews
2025-04-09 18:11:54 -05:00

View File

@@ -672,7 +672,9 @@ void GridMapEditor::_show_viewports_transform_gizmo(bool p_value) {
}
EditorPlugin::AfterGUIInput GridMapEditor::forward_spatial_input_event(Camera3D *p_camera, const Ref<InputEvent> &p_event) {
if (!node) {
// If the mouse is currently captured, we are most likely in freelook mode.
// In this case, disable shortcuts to avoid conflicts with freelook navigation.
if (!node || Input::get_singleton()->get_mouse_mode() == Input::MOUSE_MODE_CAPTURED) {
return EditorPlugin::AFTER_GUI_INPUT_PASS;
}