summaryrefslogtreecommitdiffstats
path: root/editor/create_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/create_dialog.cpp')
-rw-r--r--editor/create_dialog.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 02ce081c02..03e636d43a 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -423,10 +423,16 @@ void CreateDialog::_sbox_input(const Ref<InputEvent> &p_ie) {
}
}
+void CreateDialog::_update_theme() {
+ search_box->set_right_icon(search_options->get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
+ favorite->set_icon(search_options->get_theme_icon(SNAME("Favorites"), SNAME("EditorIcons")));
+}
+
void CreateDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
connect("confirmed", callable_mp(this, &CreateDialog::_confirmed));
+ _update_theme();
} break;
case NOTIFICATION_EXIT_TREE: {
@@ -443,8 +449,7 @@ void CreateDialog::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
- search_box->set_right_icon(search_options->get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
- favorite->set_icon(search_options->get_theme_icon(SNAME("Favorites"), SNAME("EditorIcons")));
+ _update_theme();
} break;
}
}