From 3668ff51702ce15cd5f942143c3eca15bb15ffdc Mon Sep 17 00:00:00 2001 From: Graham Dawes Date: Thu, 5 Sep 2019 15:51:23 +0100 Subject: [PATCH] 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 --- src/qt/window.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qt/window.cpp b/src/qt/window.cpp index 84e8e0ace1..1f5b35743d 100644 --- a/src/qt/window.cpp +++ b/src/qt/window.cpp @@ -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