Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

LCL: TControl.UpdateBaseBounds: set cfBaseBoundsValid

git-svn-id: http://svn.freepascal.org/svn/lazarus/trunk@36857 4005530d-fff6-0310-9dd1-cebe43e6787f
  • Loading branch information...
commit b05ef7445d33c4796b5d84d5c25b9c6c4118c974 1 parent d75f535
mattias authored
Showing with 20 additions and 16 deletions.
  1. +20 −16 lcl/include/control.inc
36 lcl/include/control.inc
View
@@ -3750,6 +3750,7 @@ begin
for a:=Low(TAnchorKind) to high(TAnchorKind) do
if (a in NewAnchors) and (AnchorSide[a].Side=asrCenter) then
AnchorSide[a].FixCenterAnchoring;
+ UpdateAnchorRules;
AdjustSize;
end;
@@ -3787,23 +3788,26 @@ begin
NewBaseParentClientSize:=Size(0,0);
end else
NewBaseParentClientSize:=FBaseParentClientSize;
- if CompareRect(@NewBaseBounds,@FBaseBounds)
- and (NewBaseParentClientSize.cx=FBaseParentClientSize.cx)
- and (NewBaseParentClientSize.cy=FBaseParentClientSize.cy)
- then exit;
- //if csDesigning in ComponentState then
- {$IFDEF CHECK_POSITION}
- if CheckPosition(Self) then
- DebugLn(['TControl.UpdateBaseBounds '+DbgSName(Self),
- ' OldBounds='+dbgs(FBaseBounds),
- ' OldParentClientSize='+dbgs(FBaseParentClientSize),
- ' NewBounds='+dbgs(NewBaseBounds),
- ' NewParentClientSize='+dbgs(NewBaseParentClientSize),
- '']);
- {$ENDIF}
- FBaseBounds:=NewBaseBounds;
+
+ if (not CompareRect(@NewBaseBounds,@FBaseBounds))
+ or (NewBaseParentClientSize.cx<>FBaseParentClientSize.cx)
+ or (NewBaseParentClientSize.cy<>FBaseParentClientSize.cy)
+ then begin
+ //if csDesigning in ComponentState then
+ {$IFDEF CHECK_POSITION}
+ if CheckPosition(Self) then
+ DebugLn(['TControl.UpdateBaseBounds '+DbgSName(Self),
+ ' OldBounds='+dbgs(FBaseBounds),
+ ' OldParentClientSize='+dbgs(FBaseParentClientSize),
+ ' NewBounds='+dbgs(NewBaseBounds),
+ ' NewParentClientSize='+dbgs(NewBaseParentClientSize),
+ '']);
+ {$ENDIF}
+
+ FBaseBounds:=NewBaseBounds;
+ FBaseParentClientSize:=NewBaseParentClientSize;
+ end;
Include(FControlFlags,cfBaseBoundsValid);
- FBaseParentClientSize:=NewBaseParentClientSize;
end;
procedure TControl.WriteLayoutDebugReport(const Prefix: string);
Please sign in to comment.
Something went wrong with that request. Please try again.