Qt: do not call directly TPopupMenu().Close, since it crashes on MacOsX, set global variable Menus.ActivePopupMenu := nil and use OnClose()

git-svn-id: trunk@23548 -
This commit is contained in:
zeljko 2010-01-24 17:20:45 +00:00
parent 15f98d8c3f
commit 29758e8f72

View File

@ -8480,7 +8480,11 @@ end;
procedure TQtMenu.DoPopupClose;
begin
if FMenuItem.Menu is TPopupMenu then
TPopupMenu(FMenuItem.Menu).Close;
begin
if Assigned(TPopupMenu(FMenuItem.Menu).OnClose) then
TPopupMenu(FMenuItem.Menu).OnClose(FMenuItem.Menu);
Menus.ActivePopupMenu := nil;
end;
end;
procedure TQtMenu.SlotDestroy; cdecl;