On Tue, 18 Apr 2006 21:26:13 +0200
darekm <[EMAIL PROTECTED]> wrote:

> Mattias Gaertner wrote:
> 
> >On Sat, 15 Apr 2006 21:44:52 +0200
> >darekm <[EMAIL PROTECTED]> wrote:
> >
> >  
> >
> >>Hi
> >>  attached patch repair
> >>   calculation of visibility scrollbar
> >>   Clicked on tButton now work for scrolled window
> >>
> >> all under GTK+
> >>    
> >>
> >
> >Note: DisableAlign/EnableAlign needs try..finally, otherwise you can run
> >into very hard to track down bugs.
> >
> >  
> >
>  added try finally
> 
> 
>  and small comment:
>   -  bugfix for enabled scrollbar for  tscrollbox
>    - small optimization for invoked FindControlAtPosition when mouse 
> make no move (it need many time for huge window, with many controls)
>   - optimizations for Align (its invoked too many times)
> 
> Darek


I don't understand this:

--- include/wincontrol.inc      (wersja 9143)
+++ include/wincontrol.inc      (kopia robocza)
@@ -1675,6 +1675,8 @@
   AWinControl: TWinControl;
 begin
   if AutoSizeDelayed then exit;
+  DisableAlign;
+  try
   for i:=0 to ControlCount-1 do begin
     Child:=Controls[i];
     if Child.AutoSizeDelayed then continue;
@@ -1691,6 +1693,9 @@
         AWinControl.ReAlign;
     end;
   end;
+  finally
+    EnableAlign;
+  end;
 end;
 
DisableAlign will make Child.AutoSizeDelayed true, so nothing is done in the
loop.

Rest applied. Thanks.

Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to