diff options
| author | megalobyte <megalobyte@protonmail.com> | 2022-02-15 21:44:22 -0500 |
|---|---|---|
| committer | megalobyte <megalobyte@protonmail.com> | 2022-02-16 08:44:37 -0500 |
| commit | 8824b6c5e9dc6a24a17452ded0c800ec267f812f (patch) | |
| tree | 9902ce6e7a98f5deb6639b25c7e8d16354629889 /editor/plugins/replication_editor_plugin.cpp | |
| parent | 98b97d34df7f3ab2cafc3847358c231c3d357b40 (diff) | |
| download | redot-engine-8824b6c5e9dc6a24a17452ded0c800ec267f812f.tar.gz | |
Update if == NOTIFICATION_* to switch statements to match coding style
Diffstat (limited to 'editor/plugins/replication_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/replication_editor_plugin.cpp | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/editor/plugins/replication_editor_plugin.cpp b/editor/plugins/replication_editor_plugin.cpp index 604cbcd103..e4c1c69804 100644 --- a/editor/plugins/replication_editor_plugin.cpp +++ b/editor/plugins/replication_editor_plugin.cpp @@ -94,10 +94,15 @@ void ReplicationEditor::_bind_methods() { } void ReplicationEditor::_notification(int p_what) { - if (p_what == NOTIFICATION_ENTER_TREE || p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) { - add_theme_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("panel"), SNAME("Panel"))); - } else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) { - update_keying(); + switch (p_what) { + case NOTIFICATION_ENTER_TREE: + case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { + add_theme_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("panel"), SNAME("Panel"))); + } break; + + case NOTIFICATION_VISIBILITY_CHANGED: { + update_keying(); + } break; } } @@ -355,13 +360,15 @@ void ReplicationEditorPlugin::_property_keyed(const String &p_keyed, const Varia } void ReplicationEditorPlugin::_notification(int p_what) { - if (p_what == NOTIFICATION_ENTER_TREE) { - //Node3DEditor::get_singleton()->connect("transform_key_request", callable_mp(this, &AnimationPlayerEditorPlugin::_transform_key_request)); - InspectorDock::get_inspector_singleton()->connect("property_keyed", callable_mp(this, &ReplicationEditorPlugin::_property_keyed)); - repl_editor->connect("keying_changed", callable_mp(this, &ReplicationEditorPlugin::_keying_changed)); - // TODO make lock usable. - //InspectorDock::get_inspector_singleton()->connect("object_inspected", callable_mp(repl_editor, &ReplicationEditor::update_keying)); - get_tree()->connect("node_removed", callable_mp(this, &ReplicationEditorPlugin::_node_removed)); + switch (p_what) { + case NOTIFICATION_ENTER_TREE: { + //Node3DEditor::get_singleton()->connect("transform_key_request", callable_mp(this, &AnimationPlayerEditorPlugin::_transform_key_request)); + InspectorDock::get_inspector_singleton()->connect("property_keyed", callable_mp(this, &ReplicationEditorPlugin::_property_keyed)); + repl_editor->connect("keying_changed", callable_mp(this, &ReplicationEditorPlugin::_keying_changed)); + // TODO make lock usable. + //InspectorDock::get_inspector_singleton()->connect("object_inspected", callable_mp(repl_editor, &ReplicationEditor::update_keying)); + get_tree()->connect("node_removed", callable_mp(this, &ReplicationEditorPlugin::_node_removed)); + } break; } } |
