summaryrefslogtreecommitdiff
path: root/editor/reparent_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/reparent_dialog.cpp')
-rw-r--r--editor/reparent_dialog.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/editor/reparent_dialog.cpp b/editor/reparent_dialog.cpp
index 1a83a61534..8879085d86 100644
--- a/editor/reparent_dialog.cpp
+++ b/editor/reparent_dialog.cpp
@@ -35,12 +35,14 @@
#include "scene/gui/label.h"
void ReparentDialog::_notification(int p_what) {
- if (p_what == NOTIFICATION_ENTER_TREE) {
- connect("confirmed", callable_mp(this, &ReparentDialog::_reparent));
- }
-
- if (p_what == NOTIFICATION_EXIT_TREE) {
- disconnect("confirmed", callable_mp(this, &ReparentDialog::_reparent));
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE: {
+ connect("confirmed", callable_mp(this, &ReparentDialog::_reparent));
+ } break;
+
+ case NOTIFICATION_EXIT_TREE: {
+ disconnect("confirmed", callable_mp(this, &ReparentDialog::_reparent));
+ } break;
}
}