diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-16 20:58:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-16 20:58:55 +0100 |
commit | 009254d87c1de573d2abeb273676f22d0bdfc67f (patch) | |
tree | 6123649c85c0a6d513224901de8a25bc068c4901 /editor/shader_globals_editor.cpp | |
parent | 5d5f80b5295479ca4e12989394b3a2af8819a1ee (diff) | |
parent | 6553f5c242865f9aadbe2fdab6db6876c44ac472 (diff) |
Merge pull request #58187 from jakobbouchard/notification-switch-chunk-c
Convert _notification methods to switch - Chunk C
Diffstat (limited to 'editor/shader_globals_editor.cpp')
-rw-r--r-- | editor/shader_globals_editor.cpp | 17 |
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; } } |