summaryrefslogtreecommitdiff
path: root/vcl/source/app
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-11-23 08:54:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-11-23 17:35:26 +0100
commitf5137ed5453661d21e85ecb94a08cfccae899ca1 (patch)
tree5d889605628b8617f202829e3378be68fd1bd971 /vcl/source/app
parent90ce07f5afcf52fc1ad7a9e636c8409af2d05913 (diff)
only call signal_closed from Popdown dtor if it is still open
Change-Id: I251239a6ebbd3f55b68a0c2cb15b4bd6728e19c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125703 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/app')
-rw-r--r--vcl/source/app/salvtables.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index e8f51950b04f..78148cd10ea8 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -6696,7 +6696,12 @@ SalInstancePopover::SalInstancePopover(DockingWindow* pPopover, SalInstanceBuild
{
}
-SalInstancePopover::~SalInstancePopover() { signal_closed(); }
+SalInstancePopover::~SalInstancePopover()
+{
+ DockingManager* pDockingManager = vcl::Window::GetDockingManager();
+ if (pDockingManager->IsInPopupMode(m_xPopover))
+ ImplPopDown();
+}
void SalInstancePopover::popup_at_rect(weld::Widget* pParent, const tools::Rectangle& rRect,
weld::Placement ePlace)
@@ -6726,13 +6731,15 @@ void SalInstancePopover::popup_at_rect(weld::Widget* pParent, const tools::Recta
pDockingManager->StartPopupMode(m_xPopover, aRect, nFlags);
}
-void SalInstancePopover::popdown()
+void SalInstancePopover::ImplPopDown()
{
vcl::Window::GetDockingManager()->EndPopupMode(m_xPopover);
m_xPopover->EnableDocking(false);
signal_closed();
}
+void SalInstancePopover::popdown() { ImplPopDown(); }
+
IMPL_LINK_NOARG(SalInstancePopover, PopupModeEndHdl, FloatingWindow*, void) { signal_closed(); }
SalInstanceBuilder::SalInstanceBuilder(vcl::Window* pParent, const OUString& rUIRoot,