فهرست منبع

fixed queued update

mattias 2 سال پیش
والد
کامیت
e83430e2bc
2فایلهای تغییر یافته به همراه12 افزوده شده و 7 حذف شده
  1. 1 0
      src/fresnelcontrols.pas
  2. 11 7
      src/fresnellclcontrols.pas

+ 1 - 0
src/fresnelcontrols.pas

@@ -332,6 +332,7 @@ begin
   FCaption:=AValue;
   FMinCaption:='';
   FLabelStates:=FLabelStates-[flsMinCaptionValid,flsMinWidthValid,flsSizeValid];
+  DomChanged;
 end;
 
 function TCustomFresnelLabel.GetMinWidthIntrinsicContentBox: TFresnelLength;

+ 11 - 7
src/fresnellclcontrols.pas

@@ -351,13 +351,17 @@ end;
 
 procedure TCustomFresnelForm.OnQueuedLayout(Data: PtrInt);
 begin
-  ApplyCSS;
-  //Layouter.WriteLayoutTree;
-  Layouter.Apply(Self);
-  if Designer<>nil then
-    Designer.InvalidateRect(Self,Bounds(0,0,ceil(Width),ceil(Height)),false)
-  else
-    Form.Invalidate;
+  try
+    ApplyCSS;
+    //Layouter.WriteLayoutTree;
+    Layouter.Apply(Self);
+    if Designer<>nil then
+      Designer.InvalidateRect(Self,Bounds(0,0,ceil(Width),ceil(Height)),false)
+    else
+      Form.Invalidate;
+  finally
+    FLayoutQueued:=false;
+  end;
 end;
 
 procedure TCustomFresnelForm.ProcessResource;