summaryrefslogtreecommitdiff
path: root/editor/shader_globals_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/shader_globals_editor.cpp')
-rw-r--r--editor/shader_globals_editor.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp
index 034f6d4857..70a43d24ba 100644
--- a/editor/shader_globals_editor.cpp
+++ b/editor/shader_globals_editor.cpp
@@ -438,13 +438,16 @@ void ShaderGlobalsEditor::_bind_methods() {
}
void ShaderGlobalsEditor::_notification(int p_what) {
- if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
- if (is_visible_in_tree()) {
- inspector->edit(interface);
- }
- }
- if (p_what == NOTIFICATION_PREDELETE) {
- inspector->edit(nullptr);
+ switch (p_what) {
+ case NOTIFICATION_VISIBILITY_CHANGED: {
+ if (is_visible_in_tree()) {
+ inspector->edit(interface);
+ }
+ } break;
+
+ case NOTIFICATION_PREDELETE: {
+ inspector->edit(nullptr);
+ } break;
}
}