diff options
Diffstat (limited to 'scene/gui/reference_rect.cpp')
-rw-r--r-- | scene/gui/reference_rect.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/scene/gui/reference_rect.cpp b/scene/gui/reference_rect.cpp index 5190a5a7d2..05dfe4b118 100644 --- a/scene/gui/reference_rect.cpp +++ b/scene/gui/reference_rect.cpp @@ -46,6 +46,10 @@ void ReferenceRect::_notification(int p_what) { } void ReferenceRect::set_border_color(const Color &p_color) { + if (border_color == p_color) { + return; + } + border_color = p_color; update(); } @@ -55,7 +59,12 @@ Color ReferenceRect::get_border_color() const { } void ReferenceRect::set_border_width(float p_width) { - border_width = MAX(0.0, p_width); + float width_max = MAX(0.0, p_width); + if (border_width == width_max) { + return; + } + + border_width = width_max; update(); } @@ -64,6 +73,10 @@ float ReferenceRect::get_border_width() const { } void ReferenceRect::set_editor_only(const bool &p_enabled) { + if (editor_only == p_enabled) { + return; + } + editor_only = p_enabled; update(); } |