summaryrefslogtreecommitdiff
path: root/scene/gui/reference_rect.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-15 20:48:18 +0100
committerGitHub <noreply@github.com>2022-02-15 20:48:18 +0100
commit98b97d34df7f3ab2cafc3847358c231c3d357b40 (patch)
tree431aa6f107e860aa1e1f4ae8864f9b06e8ace169 /scene/gui/reference_rect.cpp
parent6d575873969609e6ed58dee5052d23512b104498 (diff)
parent0f5455230c8955be0c6533574bd3d5b6f50792b6 (diff)
Merge pull request #58151 from akien-mga/notification-switch-scene
Diffstat (limited to 'scene/gui/reference_rect.cpp')
-rw-r--r--scene/gui/reference_rect.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/scene/gui/reference_rect.cpp b/scene/gui/reference_rect.cpp
index e2a0d568a1..ed79da5c22 100644
--- a/scene/gui/reference_rect.cpp
+++ b/scene/gui/reference_rect.cpp
@@ -33,13 +33,15 @@
#include "core/config/engine.h"
void ReferenceRect::_notification(int p_what) {
- if (p_what == NOTIFICATION_DRAW) {
- if (!is_inside_tree()) {
- return;
- }
- if (Engine::get_singleton()->is_editor_hint() || !editor_only) {
- draw_rect(Rect2(Point2(), get_size()), border_color, false, border_width);
- }
+ switch (p_what) {
+ case NOTIFICATION_DRAW: {
+ if (!is_inside_tree()) {
+ return;
+ }
+ if (Engine::get_singleton()->is_editor_hint() || !editor_only) {
+ draw_rect(Rect2(Point2(), get_size()), border_color, false, border_width);
+ }
+ } break;
}
}