summaryrefslogtreecommitdiff
path: root/modules/gridmap
diff options
context:
space:
mode:
authorAaron Record <aaronjrecord@gmail.com>2022-07-29 23:35:34 -0600
committerAaron Record <aaronjrecord@gmail.com>2022-08-27 11:52:29 -0600
commit4b817a565cab8af648c88cfc7ab6481e86ee3625 (patch)
treec12f7e186f04d71ea9731b1308d682f876262aed /modules/gridmap
parent4808d01b2bcda54db15e1e2649e0a38c37886ee1 (diff)
Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED
Diffstat (limited to 'modules/gridmap')
-rw-r--r--modules/gridmap/editor/grid_map_editor_plugin.cpp13
-rw-r--r--modules/gridmap/editor/grid_map_editor_plugin.h1
2 files changed, 4 insertions, 10 deletions
diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp
index 17f9832096..b0f73a98c9 100644
--- a/modules/gridmap/editor/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/editor/grid_map_editor_plugin.cpp
@@ -1011,13 +1011,6 @@ void GridMapEditor::_draw_grids(const Vector3 &cell_size) {
}
}
-void GridMapEditor::_update_theme() {
- options->set_icon(get_theme_icon(SNAME("GridMap"), SNAME("EditorIcons")));
- search_box->set_right_icon(get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
- mode_thumbnail->set_icon(get_theme_icon(SNAME("FileThumbnail"), SNAME("EditorIcons")));
- mode_list->set_icon(get_theme_icon(SNAME("FileList"), SNAME("EditorIcons")));
-}
-
void GridMapEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
@@ -1038,7 +1031,6 @@ void GridMapEditor::_notification(int p_what) {
_update_selection_transform();
_update_paste_indicator();
- _update_theme();
} break;
case NOTIFICATION_EXIT_TREE: {
@@ -1079,7 +1071,10 @@ void GridMapEditor::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
- _update_theme();
+ options->set_icon(get_theme_icon(SNAME("GridMap"), SNAME("EditorIcons")));
+ search_box->set_right_icon(get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
+ mode_thumbnail->set_icon(get_theme_icon(SNAME("FileThumbnail"), SNAME("EditorIcons")));
+ mode_list->set_icon(get_theme_icon(SNAME("FileList"), SNAME("EditorIcons")));
} break;
case NOTIFICATION_APPLICATION_FOCUS_OUT: {
diff --git a/modules/gridmap/editor/grid_map_editor_plugin.h b/modules/gridmap/editor/grid_map_editor_plugin.h
index a64dc4a80b..773bf4b6a4 100644
--- a/modules/gridmap/editor/grid_map_editor_plugin.h
+++ b/modules/gridmap/editor/grid_map_editor_plugin.h
@@ -193,7 +193,6 @@ class GridMapEditor : public VBoxContainer {
void _item_selected_cbk(int idx);
void _update_cursor_transform();
void _update_cursor_instance();
- void _update_theme();
void _text_changed(const String &p_text);
void _sbox_input(const Ref<InputEvent> &p_ie);