mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 12:18:03 +02:00
LCL: Allow updating image in TMenuItem externally. Issue #36607, patch from Anton Kavalenka.
git-svn-id: trunk@62585 -
This commit is contained in:
parent
fab987c917
commit
a79371c9f2
@ -1462,7 +1462,7 @@ procedure TMenuItem.UpdateImage(forced: Boolean);
|
||||
var
|
||||
ImgList: TCustomImageList;
|
||||
begin
|
||||
if HandleAllocated and ([csLoading, csDestroying] * ComponentState = []) then
|
||||
if [csLoading, csDestroying] * ComponentState = [] then
|
||||
begin
|
||||
ImgList := GetImageList;
|
||||
if FBitmapIsValid then // Bitmap is assigned through Bitmap property
|
||||
@ -1481,7 +1481,8 @@ begin
|
||||
FBitmapIsValid := True;
|
||||
end;
|
||||
end;
|
||||
UpdateWSIcon;
|
||||
if HandleAllocated then
|
||||
UpdateWSIcon;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user