summaryrefslogtreecommitdiff
path: root/editor/property_selector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/property_selector.cpp')
-rw-r--r--editor/property_selector.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp
index 825802d852..453ecb6b24 100644
--- a/editor/property_selector.cpp
+++ b/editor/property_selector.cpp
@@ -421,10 +421,14 @@ void PropertySelector::_hide_requested() {
}
void PropertySelector::_notification(int p_what) {
- if (p_what == NOTIFICATION_ENTER_TREE) {
- connect("confirmed", callable_mp(this, &PropertySelector::_confirmed));
- } else if (p_what == NOTIFICATION_EXIT_TREE) {
- disconnect("confirmed", callable_mp(this, &PropertySelector::_confirmed));
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE: {
+ connect("confirmed", callable_mp(this, &PropertySelector::_confirmed));
+ } break;
+
+ case NOTIFICATION_EXIT_TREE: {
+ disconnect("confirmed", callable_mp(this, &PropertySelector::_confirmed));
+ } break;
}
}