diff options
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/menu.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/menufloatingwindow.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/menufloatingwindow.hxx | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 5ab0eef8471a..6e7fc5494ca5 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2745,8 +2745,8 @@ PopupMenu::~PopupMenu() void PopupMenu::ClosePopup(PopupMenu* pPopupMenu) { MenuFloatingWindow* p = ImplGetFloatingWindow(); - if (p && pPopupMenu) - p->KillActivePopup(pPopupMenu); + if (p && pPopupMenu && p->GetActivePopup() == pPopupMenu) + p->KillActivePopup(); } namespace vcl diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index 0d6a60689c35..8beb36be0760 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -477,9 +477,9 @@ void MenuFloatingWindow::StopExecute() pMenu->pStartedFrom->ImplCallEventListeners( VclEventId::MenuSubmenuDeactivate, nPosInParent ); } -void MenuFloatingWindow::KillActivePopup( PopupMenu* pThisOnly ) +void MenuFloatingWindow::KillActivePopup() { - if ( !pActivePopup || ( pThisOnly && ( pThisOnly != pActivePopup ) ) ) + if (!pActivePopup) return; if (MenuFloatingWindow* pFloatWin = pActivePopup->ImplGetFloatingWindow()) diff --git a/vcl/source/window/menufloatingwindow.hxx b/vcl/source/window/menufloatingwindow.hxx index 5324197aa8bd..3d364847361a 100644 --- a/vcl/source/window/menufloatingwindow.hxx +++ b/vcl/source/window/menufloatingwindow.hxx @@ -113,7 +113,7 @@ public: void EndExecute( sal_uInt16 nSelectId ); PopupMenu* GetActivePopup() const { return pActivePopup; } - void KillActivePopup( PopupMenu* pThisOnly = nullptr ); + void KillActivePopup(); void ChangeHighlightItem(sal_uInt16 n, bool bStartPopupTimer); sal_uInt16 GetHighlightedItem() const { return nHighlightedItem; } |