You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Fix hardcoded Maya style navigation pan key modifier
ALT key modifier was hardcoded is node_3d_editor_plugin.cpp and didn't take editor settings into account.
Fix #46973
(cherry picked from commit 31077d875e)
This commit is contained in:
@@ -1847,10 +1847,8 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
|
|||||||
|
|
||||||
} else if (m->get_button_mask() & BUTTON_MASK_MIDDLE) {
|
} else if (m->get_button_mask() & BUTTON_MASK_MIDDLE) {
|
||||||
|
|
||||||
if (nav_scheme == NAVIGATION_GODOT) {
|
|
||||||
|
|
||||||
const int mod = _get_key_modifier(m);
|
const int mod = _get_key_modifier(m);
|
||||||
|
if (nav_scheme == NAVIGATION_GODOT) {
|
||||||
if (mod == _get_key_modifier_setting("editors/3d/navigation/pan_modifier")) {
|
if (mod == _get_key_modifier_setting("editors/3d/navigation/pan_modifier")) {
|
||||||
nav_mode = NAVIGATION_PAN;
|
nav_mode = NAVIGATION_PAN;
|
||||||
} else if (mod == _get_key_modifier_setting("editors/3d/navigation/zoom_modifier")) {
|
} else if (mod == _get_key_modifier_setting("editors/3d/navigation/zoom_modifier")) {
|
||||||
@@ -1861,9 +1859,10 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else if (nav_scheme == NAVIGATION_MAYA) {
|
} else if (nav_scheme == NAVIGATION_MAYA) {
|
||||||
if (m->get_alt())
|
if (mod == _get_key_modifier_setting("editors/3d/navigation/pan_modifier")) {
|
||||||
nav_mode = NAVIGATION_PAN;
|
nav_mode = NAVIGATION_PAN;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else if (EditorSettings::get_singleton()->get("editors/3d/navigation/emulate_3_button_mouse")) {
|
} else if (EditorSettings::get_singleton()->get("editors/3d/navigation/emulate_3_button_mouse")) {
|
||||||
// Handle trackpad (no external mouse) use case
|
// Handle trackpad (no external mouse) use case
|
||||||
|
|||||||
Reference in New Issue
Block a user