From eb280d0ed73c7b3a410c94f4eb995b23cccb9e6a Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Mon, 24 Nov 2025 16:03:35 +0800 Subject: Add cache logic for layout. --- src/ui/controls/Control.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui/controls/Control.cpp') diff --git a/src/ui/controls/Control.cpp b/src/ui/controls/Control.cpp index 41644755..2a94252f 100644 --- a/src/ui/controls/Control.cpp +++ b/src/ui/controls/Control.cpp @@ -110,7 +110,7 @@ void Control::InsertChildAt(Control* control, Index index) { OnChildInserted(control, index); if (host_) { - host_->InvalidateLayout(); + host_->ScheduleRelayout(); } } @@ -131,7 +131,7 @@ void Control::RemoveChildAt(Index index) { OnChildRemoved(control, index); if (host_) { - host_->InvalidateLayout(); + host_->ScheduleRelayout(); } } -- cgit v1.2.3