summaryrefslogtreecommitdiff
path: root/modules/openxr/editor
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/openxr/editor
parent4808d01b2bcda54db15e1e2649e0a38c37886ee1 (diff)
Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED
Diffstat (limited to 'modules/openxr/editor')
-rw-r--r--modules/openxr/editor/openxr_action_editor.cpp7
-rw-r--r--modules/openxr/editor/openxr_action_editor.h1
-rw-r--r--modules/openxr/editor/openxr_action_map_editor.cpp1
-rw-r--r--modules/openxr/editor/openxr_action_set_editor.cpp11
-rw-r--r--modules/openxr/editor/openxr_action_set_editor.h1
-rw-r--r--modules/openxr/editor/openxr_select_action_dialog.cpp1
-rw-r--r--modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp1
7 files changed, 4 insertions, 19 deletions
diff --git a/modules/openxr/editor/openxr_action_editor.cpp b/modules/openxr/editor/openxr_action_editor.cpp
index 41c6465f43..59f28b3e12 100644
--- a/modules/openxr/editor/openxr_action_editor.cpp
+++ b/modules/openxr/editor/openxr_action_editor.cpp
@@ -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;
}
}
diff --git a/modules/openxr/editor/openxr_action_editor.h b/modules/openxr/editor/openxr_action_editor.h
index 6cf098cf08..2667268e9a 100644
--- a/modules/openxr/editor/openxr_action_editor.h
+++ b/modules/openxr/editor/openxr_action_editor.h
@@ -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);
diff --git a/modules/openxr/editor/openxr_action_map_editor.cpp b/modules/openxr/editor/openxr_action_map_editor.cpp
index 0a2d0a3110..60b2eed2f0 100644
--- a/modules/openxr/editor/openxr_action_map_editor.cpp
+++ b/modules/openxr/editor/openxr_action_map_editor.cpp
@@ -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));
diff --git a/modules/openxr/editor/openxr_action_set_editor.cpp b/modules/openxr/editor/openxr_action_set_editor.cpp
index 7bf8557c5b..dd3a72db29 100644
--- a/modules/openxr/editor/openxr_action_set_editor.cpp
+++ b/modules/openxr/editor/openxr_action_set_editor.cpp
@@ -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;
}
diff --git a/modules/openxr/editor/openxr_action_set_editor.h b/modules/openxr/editor/openxr_action_set_editor.h
index d8c85d03dd..0a9e3fe7b0 100644
--- a/modules/openxr/editor/openxr_action_set_editor.h
+++ b/modules/openxr/editor/openxr_action_set_editor.h
@@ -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();
diff --git a/modules/openxr/editor/openxr_select_action_dialog.cpp b/modules/openxr/editor/openxr_select_action_dialog.cpp
index 80e58044d5..1b7423ec73 100644
--- a/modules/openxr/editor/openxr_select_action_dialog.cpp
+++ b/modules/openxr/editor/openxr_select_action_dialog.cpp
@@ -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;
diff --git a/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp b/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp
index 23b025db08..8c88e268e9 100644
--- a/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp
+++ b/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp
@@ -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;