diff options
Diffstat (limited to 'editor/editor_plugin.cpp')
-rw-r--r-- | editor/editor_plugin.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 10a2af0cb0..5166200ee3 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -849,11 +849,14 @@ void EditorPlugin::_editor_project_settings_changed() { emit_signal(SNAME("project_settings_changed")); } void EditorPlugin::_notification(int p_what) { - if (p_what == NOTIFICATION_ENTER_TREE) { - EditorNode::get_singleton()->connect("project_settings_changed", callable_mp(this, &EditorPlugin::_editor_project_settings_changed)); - } - if (p_what == NOTIFICATION_EXIT_TREE) { - EditorNode::get_singleton()->disconnect("project_settings_changed", callable_mp(this, &EditorPlugin::_editor_project_settings_changed)); + switch (p_what) { + case NOTIFICATION_ENTER_TREE: { + EditorNode::get_singleton()->connect("project_settings_changed", callable_mp(this, &EditorPlugin::_editor_project_settings_changed)); + } break; + + case NOTIFICATION_EXIT_TREE: { + EditorNode::get_singleton()->disconnect("project_settings_changed", callable_mp(this, &EditorPlugin::_editor_project_settings_changed)); + } break; } } |