mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 18:58:04 +02:00
LCL-GTK2 & GTK3: Repaint MenuItem when changing ImageIndex. Issue #37607, patch from Anton Kavalenka.
git-svn-id: trunk@63823 -
This commit is contained in:
parent
7bfebf3d58
commit
b420c52946
@ -488,7 +488,9 @@ class procedure TGtk2WSMenuItem.UpdateMenuIcon(const AMenuItem: TMenuItem;
|
||||
begin
|
||||
if not WSCheckMenuItem(AMenuItem, 'UpdateMenuIcon') then
|
||||
Exit;
|
||||
if gtk_is_check_menu_item({%H-}Pointer(AMenuItem.Handle)) <> HasIcon then
|
||||
// recreating menu handle without icon may lead to failures like
|
||||
// main menu bar vanishing, see mantis issue #37607
|
||||
if HasIcon then
|
||||
AMenuItem.RecreateHandle;
|
||||
end;
|
||||
|
||||
|
@ -556,8 +556,8 @@ class procedure TGtk3WSMenuItem.UpdateMenuIcon(const AMenuItem: TMenuItem;
|
||||
begin
|
||||
if not WSCheckMenuItem(AMenuItem, 'UpdateMenuIcon') then
|
||||
Exit;
|
||||
// if gtk_is_check_menu_item({%H-}Pointer(AMenuItem.Handle)) <> HasIcon then
|
||||
AMenuItem.RecreateHandle;
|
||||
if HasIcon then
|
||||
AMenuItem.RecreateHandle;
|
||||
end;
|
||||
|
||||
{ TGtk3WSMenu }
|
||||
|
Loading…
Reference in New Issue
Block a user