mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 03:40:36 +01:00
LCL: add Notification about removed ImageLists in ListView. Issue #20619
git-svn-id: trunk@33594 -
This commit is contained in:
parent
cc82e44e9b
commit
a002250d2b
@ -1473,7 +1473,8 @@ type
|
||||
procedure InsertItem(Item : TListItem);
|
||||
procedure ImageChanged(Sender : TObject);
|
||||
procedure Loaded; override;
|
||||
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
|
||||
function IsCustomDrawn(ATarget: TCustomDrawTarget; AStage: TCustomDrawStage): Boolean; virtual;
|
||||
function CustomDraw(const ARect: TRect; AStage: TCustomDrawStage): Boolean; virtual; // Return True if default drawing should be done
|
||||
function CustomDrawItem(AItem: TListItem; AState: TCustomDrawState; AStage: TCustomDrawStage): Boolean; virtual; //
|
||||
|
||||
@ -1213,6 +1213,16 @@ begin
|
||||
inherited Loaded;
|
||||
end;
|
||||
|
||||
procedure TCustomListView.Notification(AComponent: TComponent; Operation: TOperation);
|
||||
begin
|
||||
inherited Notification(AComponent, Operation);
|
||||
if Operation = opRemove then begin
|
||||
if AComponent = LargeImages then LargeImages := nil;
|
||||
if AComponent = SmallImages then SmallImages := nil;
|
||||
if AComponent = StateImages then StateImages := nil;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomListView.SetScrollBars(const AValue: TScrollStyle);
|
||||
begin
|
||||
if (FScrollBars = AValue) then exit;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user