summaryrefslogtreecommitdiff
path: root/editor/shader_create_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/shader_create_dialog.cpp')
-rw-r--r--editor/shader_create_dialog.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/shader_create_dialog.cpp b/editor/shader_create_dialog.cpp
index 239860c9ab..dbc78e846c 100644
--- a/editor/shader_create_dialog.cpp
+++ b/editor/shader_create_dialog.cpp
@@ -29,6 +29,9 @@
/*************************************************************************/
#include "shader_create_dialog.h"
+
+#include "core/config/project_settings.h"
+#include "editor/editor_file_dialog.h"
#include "editor/editor_scale.h"
#include "scene/resources/visual_shader.h"
#include "servers/rendering/shader_types.h"
@@ -54,6 +57,7 @@ void ShaderCreateDialog::_notification(int p_what) {
current_mode = EditorSettings::get_singleton()->get_project_metadata("shader_setup", "last_selected_mode", 0);
mode_menu->select(current_mode);
} break;
+
case NOTIFICATION_THEME_CHANGED: {
_update_theme();
} break;
@@ -221,7 +225,7 @@ void ShaderCreateDialog::_language_changed(int p_language) {
String extension = "";
if (!path.is_empty()) {
- if (path.find(".") != -1) {
+ if (path.contains(".")) {
extension = path.get_extension();
}
if (extension.length() == 0) {