mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 12:30:36 +02:00
fixed TDesigner.CheckFormBounds
git-svn-id: trunk@7633 -
This commit is contained in:
parent
7f0c6e6127
commit
cba602c612
@ -1821,11 +1821,11 @@ var i:integer;
|
||||
g:TGrabIndex;
|
||||
begin
|
||||
if cssNotSavingBounds in FStates then exit;
|
||||
//debugln('TControlSelection.SaveBounds');
|
||||
if FUpdateLock>0 then begin
|
||||
Include(FStates,cssBoundsNeedsSaving);
|
||||
exit;
|
||||
end;
|
||||
//writeln('TControlSelection.SaveBounds');
|
||||
for i:=0 to FControls.Count-1 do Items[i].SaveBounds;
|
||||
for g:=Low(TGrabIndex) to High(TGrabIndex) do FGrabbers[g].SaveBounds;
|
||||
FOldLeft:=FRealLeft;
|
||||
@ -2026,14 +2026,15 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
if (Count=0) or (IsResizing) then exit;
|
||||
NewLeft:=FindNearestSnapLeft(FOldLeft+TotalDX,FWidth);
|
||||
NewTop:=FindNearestSnapTop(FOldTop+TotalDY,FHeight);
|
||||
{$IFDEF VerboseDesigner}
|
||||
DebugLn('[TControlSelection.MoveSelectionWithSnapping] A ',
|
||||
'TotalD='+dbgs(TotalDX)+','+dbgs(TotalDY),
|
||||
' CurBounds='+dbgs(FLeft)+','+dbgs(FTop)+','+dbgs(FWidth)+','+dbgs(FHeight),
|
||||
' OldBounds='+dbgs(FOldLeft)+','+dbgs(FOldTop)+','+dbgs(FOldWidth)+','+dbgs(FOldHeight));
|
||||
' OldBounds='+dbgs(FOldLeft)+','+dbgs(FOldTop)+','+dbgs(FOldWidth)+','+dbgs(FOldHeight)
|
||||
+' NewPos='+dbgs(NewLeft)+','+dbgs(NewTop));
|
||||
{$ENDIF}
|
||||
NewLeft:=FindNearestSnapLeft(FOldLeft+TotalDX,FWidth);
|
||||
NewTop:=FindNearestSnapTop(FOldTop+TotalDY,FHeight);
|
||||
if (NewLeft<>FLeft) or (NewTop<>FTop) then begin
|
||||
Result:=true;
|
||||
BeginResizing;
|
||||
|
@ -1531,7 +1531,7 @@ begin
|
||||
LastMouseMovePos:= GetFormRelativeMousePosition(Form);
|
||||
if (OldMouseMovePos.X=LastMouseMovePos.X)
|
||||
and (OldMouseMovePos.Y=LastMouseMovePos.Y) then exit;
|
||||
|
||||
|
||||
if ControlSelection.SelectionForm=Form then
|
||||
Grabber:=ControlSelection.GrabberAtPos(
|
||||
LastMouseMovePos.X, LastMouseMovePos.Y)
|
||||
@ -2211,7 +2211,9 @@ var
|
||||
begin
|
||||
NewFormBounds:=Form.BoundsRect;
|
||||
if FDefaultFormBoundsValid then begin
|
||||
if not CompareRect(@NewFormBounds,@FDefaultFormBounds) then begin
|
||||
if (not CompareRect(@NewFormBounds,@FLastFormBounds))
|
||||
and (not CompareRect(@NewFormBounds,@FDefaultFormBounds)) then begin
|
||||
//debugln('TDesigner.CheckFormBounds');
|
||||
Modified;
|
||||
if ControlSelection.SelectionForm=Form then begin
|
||||
ControlSelection.CheckForLCLChanges(true);
|
||||
|
@ -171,7 +171,7 @@ begin
|
||||
|
||||
If OpenDlg.Execute then
|
||||
begin
|
||||
fDirName:=ExtractFilePath(FileName); //save the directory
|
||||
fDirName:=ExtractFilePath(OpenDlg.FileName); //save the directory
|
||||
FileName:=OpenDlg.FileName;
|
||||
for i := 0 to OpenDlg.Files.Count - 1 do
|
||||
AddImageToList(OpenDlg.Files[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user