ButtonPanel triggers unnnecessary UpdateSizes
Original Reporter info from Mantis: Martin @martin_frb
-
Reporter name: Martin Friebe
Original Reporter info from Mantis: Martin @martin_frb
- Reporter name: Martin Friebe
Description:
TCustomButtonPanel.Notification calls UpdateSize unconditionally.
This causes completely unnecessary calls, as Notification can be called for unrelated things
Open the View Units/Forms window, and hover over a button that has a hint.
This will create a hint, which is inserted into the owning form, and triggers Notification.
There is no need for UpdateSizes.
During any form creation or destruction this method can be called many times, and trigger a flood of extra UpdateSizes.
Additional information:
procedure TCustomButtonPanel.Notification(AComponent: TComponent;
Operation: TOperation);
var
btn: TPanelButton;
begin
if Operation=opRemove
then begin
for btn := Low(btn) to High(btn) do
begin
if FButtons[btn] <> AComponent then Continue;
FButtons[btn] := nil;
Exclude(FShowButtons, btn);
end;
end;
inherited Notification(AComponent, Operation);
UpdateSizes;
end;
Mantis conversion info:
- Mantis ID: 25580
- OS: win
- OS Build: vista
- Platform: w32
- Version: 1.3 (SVN)
- Fixed in revision: r63003 (#90f3071c)