Update menu UI before showing a popup menu in wxQt
Give the application code a possibility to disable or otherwise change the menu items before the popup menu is shown, as in the other ports. Closes https://github.com/wxWidgets/wxWidgets/pull/1532
This commit is contained in:
committed by
Vadim Zeitlin
parent
2c91463c81
commit
3668ff5170
@@ -1035,9 +1035,10 @@ void wxWindowQt::DoSetToolTip( wxToolTip *tip )
|
||||
#if wxUSE_MENUS
|
||||
bool wxWindowQt::DoPopupMenu(wxMenu *menu, int x, int y)
|
||||
{
|
||||
menu->UpdateUI();
|
||||
menu->GetHandle()->exec( GetHandle()->mapToGlobal( QPoint( x, y ) ) );
|
||||
|
||||
return ( true );
|
||||
return true;
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
|
Reference in New Issue
Block a user