From 819c392ca3817de75b6d3c6da2ebf3e7d13d15b1 Mon Sep 17 00:00:00 2001 From: Ainsley Su Date: Mon, 1 Jul 2024 11:17:43 +0800 Subject: [PATCH] Notify item_rect_changed before resized. --- scene/gui/control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 0682c11a9b2..c22f74d838c 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -1744,10 +1744,10 @@ void Control::_size_changed() { // so an up to date global transform could be obtained when handling these. _notify_transform(); + item_rect_changed(size_changed); if (size_changed) { notification(NOTIFICATION_RESIZED); } - item_rect_changed(size_changed); } if (pos_changed && !size_changed) {