diff --git a/lcl/comboex.pas b/lcl/comboex.pas index dc3eaa8512..664c73e44f 100644 --- a/lcl/comboex.pas +++ b/lcl/comboex.pas @@ -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; diff --git a/lcl/grids.pas b/lcl/grids.pas index ca1978203c..e21d5f8c79 100644 --- a/lcl/grids.pas +++ b/lcl/grids.pas @@ -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); diff --git a/lcl/include/comboex.inc b/lcl/include/comboex.inc index 641b13a4e9..5cb78d92e9 100644 --- a/lcl/include/comboex.inc +++ b/lcl/include/comboex.inc @@ -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);