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.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp
index f97ffcae65..70a43d24ba 100644
--- a/editor/shader_globals_editor.cpp
+++ b/editor/shader_globals_editor.cpp
@@ -29,7 +29,10 @@
/*************************************************************************/
#include "shader_globals_editor.h"
-#include "editor_node.h"
+
+#include "core/config/project_settings.h"
+#include "editor/editor_node.h"
+#include "servers/rendering/shader_language.h"
static const char *global_var_type_names[RS::GLOBAL_VAR_TYPE_MAX] = {
"bool",
@@ -435,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;
}
}