From ba7ed0579296464642f1cc90fe76590467793131 Mon Sep 17 00:00:00 2001 From: kobewi Date: Tue, 28 Sep 2021 18:00:16 +0200 Subject: Unify panning in sub-editors and make it configurable --- modules/visual_script/editor/visual_script_editor.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules') 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); -- cgit v1.2.3