summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2021-09-28 18:00:16 +0200
committerkobewi <kobewi4e@gmail.com>2022-01-11 13:57:19 +0100
commitba7ed0579296464642f1cc90fe76590467793131 (patch)
tree457272fa9aa5b6b8c9341042274b161c81b02d97 /modules
parentb52f90e795e0de9c0e7056fd5c83d2c5e3d207af (diff)
Unify panning in sub-editors and make it configurable
Diffstat (limited to 'modules')
-rw-r--r--modules/visual_script/editor/visual_script_editor.cpp5
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);