mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 08:30:58 +02:00
lcl: TMenuItem: disable notifications for old SubMenuImages imagelist
git-svn-id: trunk@21782 -
This commit is contained in:
parent
834d683851
commit
ac7c91e727
@ -693,7 +693,8 @@ begin
|
|||||||
if Operation = opRemove then
|
if Operation = opRemove then
|
||||||
if AComponent = Action then
|
if AComponent = Action then
|
||||||
Action := nil
|
Action := nil
|
||||||
else if AComponent = FSubMenuImages then
|
else
|
||||||
|
if AComponent = FSubMenuImages then
|
||||||
SubMenuImages := nil
|
SubMenuImages := nil
|
||||||
{else if AComponent = FMerged then
|
{else if AComponent = FMerged then
|
||||||
MergeWith(nil)};
|
MergeWith(nil)};
|
||||||
@ -1196,7 +1197,10 @@ end;
|
|||||||
procedure TMenuItem.SetSubMenuImages(const AValue: TCustomImageList);
|
procedure TMenuItem.SetSubMenuImages(const AValue: TCustomImageList);
|
||||||
begin
|
begin
|
||||||
if FSubMenuImages <> nil then
|
if FSubMenuImages <> nil then
|
||||||
|
begin
|
||||||
FSubMenuImages.UnRegisterChanges(FImageChangeLink);
|
FSubMenuImages.UnRegisterChanges(FImageChangeLink);
|
||||||
|
FSubMenuImages.RemoveFreeNotification(Self);
|
||||||
|
end;
|
||||||
FSubMenuImages := AValue;
|
FSubMenuImages := AValue;
|
||||||
if FSubMenuImages <> nil then
|
if FSubMenuImages <> nil then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user