summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Gilleron <marc.gilleron@gmail.com>2016-04-12 03:37:35 +0200
committerMarc Gilleron <marc.gilleron@gmail.com>2016-04-12 03:37:35 +0200
commit84d706cb356f4f00bedfa0bff265968b439385c8 (patch)
tree0fd556b9b7b95694c1d116fb1c843a92f9e3df71
parent7d1b4567b07ac4d88bca58f70b773dd996d0cae6 (diff)
Made trackpad behaviour optional in 3D mode (issue #4265)
-rw-r--r--tools/editor/editor_settings.cpp1
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp3
2 files changed, 3 insertions, 1 deletions
diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp
index 31da68cb8c..06e92028c7 100644
--- a/tools/editor/editor_settings.cpp
+++ b/tools/editor/editor_settings.cpp
@@ -451,6 +451,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("3d_editor/zoom_modifier",4);
hints["3d_editor/zoom_modifier"]=PropertyInfo(Variant::INT,"3d_editor/zoom_modifier",PROPERTY_HINT_ENUM,"None,Shift,Alt,Meta,Ctrl");
set("3d_editor/emulate_numpad",false);
+ set("3d_editor/trackpad_hint", false);
set("2d_editor/bone_width",5);
set("2d_editor/bone_color1",Color(1.0,1.0,1.0,0.9));
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp
index 9ab7aafeb2..c4d3f7282e 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -1579,7 +1579,8 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
if (m.mod.alt)
nav_mode = NAVIGATION_PAN;
}
- }else{
+
+ } else if (EditorSettings::get_singleton()->get("3d_editor/trackpad_hint")) {
// Handle trackpad (no external mouse) use case
int mod = 0;
if (m.mod.shift)