mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 20:19:14 +02:00
LCL/TCustomGrid, TCustomCheckBoxEx: Add missing Notification method to react on destruction of TitleImageList and Images, respectively.
This commit is contained in:
parent
6efaae3d24
commit
7114800c05
@ -156,6 +156,7 @@ type
|
||||
procedure DrawItem(Index: Integer; ARect: TRect; State: TOwnerDrawState); override;
|
||||
procedure FontChanged(Sender: TObject); override;
|
||||
procedure InitializeWnd; override;
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
procedure SetItemHeight(const AValue: Integer); override;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
|
@ -1135,6 +1135,7 @@ type
|
||||
function MoveNextAuto(const Inverse: boolean): boolean;
|
||||
function MoveNextSelectable(Relative:Boolean; DCol, DRow: Integer): Boolean; virtual;
|
||||
procedure MoveSelection; virtual;
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
function OffsetToColRow(IsCol, Physical: Boolean; Offset: Integer;
|
||||
out Index, Rest: Integer): Boolean;
|
||||
procedure Paint; override;
|
||||
@ -8290,6 +8291,16 @@ begin
|
||||
if Assigned(OnSelection) then OnSelection(Self, FCol, FRow);
|
||||
end;
|
||||
|
||||
procedure TCustomGrid.Notification(AComponent: TComponent; Operation: TOperation);
|
||||
begin
|
||||
inherited Notification(AComponent, Operation);
|
||||
if (Operation = opRemove) and (AComponent = FTitleImageList) then
|
||||
begin
|
||||
FTitleImageList := nil;
|
||||
Invalidate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomGrid.BeginUpdate;
|
||||
begin
|
||||
Inc(FUpdateCount);
|
||||
|
@ -452,6 +452,16 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomComboBoxEx.Notification(AComponent: TComponent; Operation: TOperation);
|
||||
begin
|
||||
inherited Notification(AComponent, Operation);
|
||||
if (Operation = opRemove) and (AComponent = FImages) then
|
||||
begin
|
||||
FImages := nil;
|
||||
Invalidate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomComboBoxEx.SetItemHeight(const AValue: Integer);
|
||||
begin
|
||||
inherited SetItemHeight(AValue);
|
||||
|
Loading…
Reference in New Issue
Block a user