summaryrefslogtreecommitdiff
path: root/scene/gui/nine_patch_rect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/nine_patch_rect.cpp')
-rw-r--r--scene/gui/nine_patch_rect.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/scene/gui/nine_patch_rect.cpp b/scene/gui/nine_patch_rect.cpp
index 4d94bbf5d9..bc71ae94f5 100644
--- a/scene/gui/nine_patch_rect.cpp
+++ b/scene/gui/nine_patch_rect.cpp
@@ -34,8 +34,9 @@
void NinePatchRect::_notification(int p_what) {
if (p_what == NOTIFICATION_DRAW) {
- if (texture.is_null())
+ if (texture.is_null()) {
return;
+ }
Rect2 rect = Rect2(Point2(), get_size());
Rect2 src_rect = region_rect;
@@ -86,8 +87,9 @@ void NinePatchRect::_bind_methods() {
}
void NinePatchRect::set_texture(const Ref<Texture2D> &p_tex) {
- if (texture == p_tex)
+ if (texture == p_tex) {
return;
+ }
texture = p_tex;
update();
/*
@@ -130,8 +132,9 @@ int NinePatchRect::get_patch_margin(Margin p_margin) const {
}
void NinePatchRect::set_region_rect(const Rect2 &p_region_rect) {
- if (region_rect == p_region_rect)
+ if (region_rect == p_region_rect) {
return;
+ }
region_rect = p_region_rect;