diff options
Diffstat (limited to 'vcl/source/window/menu.cxx')
-rw-r--r-- | vcl/source/window/menu.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index c827905e94e6..ccf75dbd59b3 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -3480,11 +3480,6 @@ USHORT PopupMenu::Execute( Window* pExecWindow, const Rectangle& rRect, USHORT n USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupModeFlags, Menu* pSFrom, BOOL bPreSelectFirst ) { - - // #59614# Mit TH abgesprochen dass die ASSERTION raus kommt, - // weil es evtl. legitim ist... -// DBG_ASSERT( !PopupMenu::IsInExecute() || pSFrom, "PopupMenu::Execute() called in PopupMenu::Execute()" ); - if ( !pSFrom && ( PopupMenu::IsInExecute() || !GetItemCount() ) ) return 0; @@ -3660,8 +3655,16 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM { pWin->ImplAddDel( &aDelData ); + ImplDelData aModalWinDel; + pW->ImplAddDel( &aModalWinDel ); + pW->ImplIncModalCount(); + pWin->Execute(); + DBG_ASSERT( ! aModalWinDel.IsDead(), "window for popup died, modal count incorrect !" ); + if( ! aModalWinDel.IsDead() ) + pW->ImplDecModalCount(); + if ( !aDelData.IsDelete() ) pWin->ImplRemoveDel( &aDelData ); else |