Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED
This commit is contained in:
@ -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: {
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -34,15 +34,10 @@ void OpenXRActionEditor::_bind_methods() {
|
||||
ADD_SIGNAL(MethodInfo("remove", PropertyInfo(Variant::OBJECT, "action_editor")));
|
||||
}
|
||||
|
||||
void OpenXRActionEditor::_theme_changed() {
|
||||
rem_action->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
|
||||
}
|
||||
|
||||
void OpenXRActionEditor::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE:
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
_theme_changed();
|
||||
rem_action->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,7 +49,6 @@ private:
|
||||
OptionButton *action_type = nullptr;
|
||||
Button *rem_action = nullptr;
|
||||
|
||||
void _theme_changed();
|
||||
void _on_action_name_changed(const String p_new_text);
|
||||
void _on_action_localized_name_changed(const String p_new_text);
|
||||
void _on_item_selected(int p_idx);
|
||||
|
||||
@ -52,7 +52,6 @@ void OpenXRActionMapEditor::_bind_methods() {
|
||||
|
||||
void OpenXRActionMapEditor::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE:
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
for (int i = 0; i < tabs->get_child_count(); i++) {
|
||||
Control *tab = static_cast<Control *>(tabs->get_child(i));
|
||||
|
||||
@ -44,17 +44,12 @@ void OpenXRActionSetEditor::_set_fold_icon() {
|
||||
}
|
||||
}
|
||||
|
||||
void OpenXRActionSetEditor::_theme_changed() {
|
||||
_set_fold_icon();
|
||||
add_action->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
|
||||
rem_action_set->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
|
||||
}
|
||||
|
||||
void OpenXRActionSetEditor::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE:
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
_theme_changed();
|
||||
_set_fold_icon();
|
||||
add_action->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
|
||||
rem_action_set->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
|
||||
panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("TabContainer")));
|
||||
} break;
|
||||
}
|
||||
|
||||
@ -61,7 +61,6 @@ private:
|
||||
VBoxContainer *actions_vb = nullptr;
|
||||
|
||||
void _set_fold_icon();
|
||||
void _theme_changed();
|
||||
OpenXRActionEditor *_add_action_editor(Ref<OpenXRAction> p_action);
|
||||
void _update_actions();
|
||||
|
||||
|
||||
@ -37,7 +37,6 @@ void OpenXRSelectActionDialog::_bind_methods() {
|
||||
|
||||
void OpenXRSelectActionDialog::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE:
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
scroll->add_theme_style_override("bg", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
} break;
|
||||
|
||||
@ -36,7 +36,6 @@ void OpenXRSelectInteractionProfileDialog::_bind_methods() {
|
||||
|
||||
void OpenXRSelectInteractionProfileDialog::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE:
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
scroll->add_theme_style_override("bg", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
} break;
|
||||
|
||||
Reference in New Issue
Block a user