LCL: Don't make unnecessary calls to ButtonPanel.UpdateSizes. Issue #25580.

git-svn-id: trunk@63003 -
This commit is contained in:
juha 2020-04-17 07:26:18 +00:00
parent 77a7f48ed7
commit 90f3071c4f

View File

@ -487,8 +487,8 @@ procedure TCustomButtonPanel.Notification(AComponent: TComponent;
var
btn: TPanelButton;
begin
if Operation=opRemove
then begin
if Operation=opRemove then
begin
for btn := Low(btn) to High(btn) do
begin
if FButtons[btn] <> AComponent then Continue;
@ -497,7 +497,8 @@ begin
end;
end;
inherited Notification(AComponent, Operation);
UpdateSizes;
if AComponent is TPanelBitBtn then
UpdateSizes;
end;
constructor TCustomButtonPanel.Create(AOwner: TComponent);