diff options
author | Jakob Bouchard <24767889+jakobbouchard@users.noreply.github.com> | 2022-02-16 09:17:55 -0500 |
---|---|---|
committer | Jakob Bouchard <24767889+jakobbouchard@users.noreply.github.com> | 2022-02-16 13:03:05 -0500 |
commit | 6553f5c242865f9aadbe2fdab6db6876c44ac472 (patch) | |
tree | dbd6922a056a26a57fe0b62551bbfabed512fd99 /editor/property_selector.cpp | |
parent | 98b97d34df7f3ab2cafc3847358c231c3d357b40 (diff) | |
download | redot-engine-6553f5c242865f9aadbe2fdab6db6876c44ac472.tar.gz |
Convert _notification methods to switch - Chunk C
Diffstat (limited to 'editor/property_selector.cpp')
-rw-r--r-- | editor/property_selector.cpp | 12 |
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; } } |