aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/Control.cpp
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-11-24 16:03:35 +0800
committerYuqian Yang <crupest@crupest.life>2025-11-24 16:03:35 +0800
commiteb280d0ed73c7b3a410c94f4eb995b23cccb9e6a (patch)
tree38ae5316b8f8847d3d1d18607d09d671779883a5 /src/ui/controls/Control.cpp
parentcfe37d586d2513e0bfe9e4754a6c08c86773fb0e (diff)
downloadcru-eb280d0ed73c7b3a410c94f4eb995b23cccb9e6a.tar.gz
cru-eb280d0ed73c7b3a410c94f4eb995b23cccb9e6a.tar.bz2
cru-eb280d0ed73c7b3a410c94f4eb995b23cccb9e6a.zip
Add cache logic for layout.
Diffstat (limited to 'src/ui/controls/Control.cpp')
-rw-r--r--src/ui/controls/Control.cpp4
1 files changed, 2 insertions, 2 deletions
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();
}
}