[lazarus] Updates

Jesus Reyes jesusrmx at yahoo.com.mx
Wed Aug 28 16:11:26 EDT 2002


Hi, it seems like form editing is getting improved
every day, thanks. Here is a little change that i made
to MoveSelectionWithSnapping so the form is only
invalidated when it needs . 

regards 
Jesús Reyes A.


Index: lazarus/designer/controlselection.pp
===================================================================
RCS file:
/FPC/CVS/projects/lazarus/designer/controlselection.pp,v
retrieving revision 1.34
diff -r1.34 controlselection.pp
251c251
<     procedure MoveSelectionWithSnapping(TotalDX,
TotalDY: integer);
---
>     function MoveSelectionWithSnapping(TotalDX,
TotalDY: integer): Boolean;
1191,1192c1191,1194
< procedure
TControlSelection.MoveSelectionWithSnapping(TotalDX,
TotalDY: integer
<   );
---
> Function
TControlSelection.MoveSelectionWithSnapping(TotalDX,
TotalDY: integer
>   ): Boolean;
> Var
> NewLeft,NewTop: Integer;
1193a1196
>   Result:=False;
1199,1206c1202,1214
<   BeginResizing;
<  
FLeft:=FindNearestSnapLeft(FOldLeft+TotalDX,FWidth);
<   FTop:=FindNearestSnapTop(FOldTop+TotalDY,FHeight);
<   {$IFDEF VerboseDesigner}
<  
writeln('[TControlSelection.MoveSelectionWithSnapping]
B  ',
<     FLeft,',',FTop,',',FWidth,',',FHeight);
<   {$ENDIF}
<   EndResizing(true);
---
>  
NewLeft:=FindNearestSnapLeft(FOldLeft+TotalDX,FWidth);
>  
NewTop:=FindNearestSnapTop(FOldTop+TotalDY,FHeight);
>   If (FLeft<>NewLeft)or(FTop<>NewTop) then begin 
>   BeginResizing;
>   FLeft:=NewLeft;
> FTop:=NewTop;
> {$IFDEF VerboseDesigner}
>
writeln('[TControlSelection.MoveSelectionWithSnapping]
B  ',
> FLeft,',',FTop,',',FWidth,',',FHeight);
> {$ENDIF}
> EndResizing(true);
> Result:=True;
>   End;
Index: lazarus/designer/designer.pp
===================================================================
RCS file:
/FPC/CVS/projects/lazarus/designer/designer.pp,v
retrieving revision 1.81
diff -r1.81 designer.pp
691,694c691,695
<         ControlSelection.MoveSelectionWithSnapping(
<          
LastMouseMovePos.X-MouseDownPos.X,LastMouseMovePos.Y-MouseDownPos.Y);
<         if Assigned(OnModified) then
OnModified(Self);
<         FCustomForm.Invalidate;
---
>         If
ControlSelection.MoveSelectionWithSnapping(
>          
LastMouseMovePos.X-MouseDownPos.X,LastMouseMovePos.Y-MouseDownPos.Y)
Then begin
>         if Assigned(OnModified) then
OnModified(Self);
>         FCustomForm.Invalidate;
> End;

_________________________________________________________
Do You Yahoo!?
La emoción e intensidad del deporte en Yahoo! Deportes. http://deportes.yahoo.com.mx






More information about the Lazarus mailing list