diff options
author | kobewi <kobewi4e@gmail.com> | 2021-09-28 18:00:16 +0200 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2022-01-11 13:57:19 +0100 |
commit | ba7ed0579296464642f1cc90fe76590467793131 (patch) | |
tree | 457272fa9aa5b6b8c9341042274b161c81b02d97 /modules | |
parent | b52f90e795e0de9c0e7056fd5c83d2c5e3d207af (diff) |
Unify panning in sub-editors and make it configurable
Diffstat (limited to 'modules')
-rw-r--r-- | modules/visual_script/editor/visual_script_editor.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/visual_script/editor/visual_script_editor.cpp b/modules/visual_script/editor/visual_script_editor.cpp index bc40f4f9b4..80e7862d9d 100644 --- a/modules/visual_script/editor/visual_script_editor.cpp +++ b/modules/visual_script/editor/visual_script_editor.cpp @@ -3753,6 +3753,11 @@ void VisualScriptEditor::_toggle_scripts_pressed() { void VisualScriptEditor::_notification(int p_what) { switch (p_what) { + case NOTIFICATION_ENTER_TREE: + case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { + graph->set_panning_scheme((GraphEdit::PanningScheme)EDITOR_GET("interface/editors/sub_editor_panning_scheme").operator int()); + } break; + case NOTIFICATION_READY: { variable_editor->connect("changed", callable_mp(this, &VisualScriptEditor::_update_members)); variable_editor->connect("changed", callable_mp(this, &VisualScriptEditor::_update_graph), varray(-1), CONNECT_DEFERRED); |