@@ -2012,9 +2012,9 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
20122012 int orbit_mod_input_count = _get_shortcut_input_count (" spatial_editor/viewport_orbit_modifier_1" ) + _get_shortcut_input_count (" spatial_editor/viewport_orbit_modifier_2" );
20132013 int pan_mod_input_count = _get_shortcut_input_count (" spatial_editor/viewport_pan_modifier_1" ) + _get_shortcut_input_count (" spatial_editor/viewport_pan_modifier_2" );
20142014 int zoom_mod_input_count = _get_shortcut_input_count (" spatial_editor/viewport_zoom_modifier_1" ) + _get_shortcut_input_count (" spatial_editor/viewport_zoom_modifier_2" );
2015- bool orbit_not_empty = !_is_shortcut_empty (" spatial_editor/viewport_zoom_modifier_1 " ) || !_is_shortcut_empty (" spatial_editor/viewport_zoom_modifier_2 " );
2015+ bool orbit_not_empty = !_is_shortcut_empty (" spatial_editor/viewport_orbit_modifier_1 " ) || !_is_shortcut_empty (" spatial_editor/viewport_orbit_modifier_2 " );
20162016 bool pan_not_empty = !_is_shortcut_empty (" spatial_editor/viewport_pan_modifier_1" ) || !_is_shortcut_empty (" spatial_editor/viewport_pan_modifier_2" );
2017- bool zoom_not_empty = !_is_shortcut_empty (" spatial_editor/viewport_orbit_modifier_1 " ) || !_is_shortcut_empty (" spatial_editor/viewport_orbit_modifier_2 " );
2017+ bool zoom_not_empty = !_is_shortcut_empty (" spatial_editor/viewport_zoom_modifier_1 " ) || !_is_shortcut_empty (" spatial_editor/viewport_zoom_modifier_2 " );
20182018 Vector<ShortcutCheckSet> shortcut_check_sets;
20192019 shortcut_check_sets.push_back (ShortcutCheckSet (orbit_mod_pressed, orbit_not_empty, orbit_mod_input_count, orbit_mouse_preference, NAVIGATION_ORBIT));
20202020 shortcut_check_sets.push_back (ShortcutCheckSet (pan_mod_pressed, pan_not_empty, pan_mod_input_count, pan_mouse_preference, NAVIGATION_PAN));
@@ -2169,9 +2169,11 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
21692169 if (pan_gesture.is_valid ()) {
21702170 NavigationMode nav_mode = NAVIGATION_NONE;
21712171
2172- NavigationMode change_nav_from_shortcut = _get_nav_mode_from_shortcut_check (NAVIGATION_LEFT_MOUSE, shortcut_check_sets, true );
2173- if (change_nav_from_shortcut != NAVIGATION_NONE) {
2174- nav_mode = change_nav_from_shortcut;
2172+ for (const ShortcutCheckSet &shortcut_check_set : shortcut_check_sets) {
2173+ if (shortcut_check_set.mod_pressed ) {
2174+ nav_mode = shortcut_check_set.result_nav_mode ;
2175+ break ;
2176+ }
21752177 }
21762178
21772179 switch (nav_mode) {
0 commit comments