summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/childwin.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-01-24 17:10:48 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-01-24 20:38:51 +0100
commit6c5c6ede0103e15b8e8ac432f0ca7f6e00c9dcb4 (patch)
treeac9eee5af19ae935b09e58b5d0944b8b692c3e46 /sfx2/source/appl/childwin.cxx
parentde170db187852c42f6bad845d00c2b19b99e9a31 (diff)
tdf#146913 don't destroy the dialog if we just want to hide it
Change-Id: Ie534aba915120d12e65aa965e5435bc7575ecb29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128879 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source/appl/childwin.cxx')
-rw-r--r--sfx2/source/appl/childwin.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 263f750f9b12..944fe47ed64a 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -511,7 +511,7 @@ void SfxChildWindow::SetVisible_Impl( bool bVis )
void SfxChildWindow::Hide()
{
if (xController)
- xController->EndDialog();
+ xController->EndDialog(nCloseResponseToJustHide);
else
pWindow->Hide();
}
@@ -523,7 +523,11 @@ void SfxChildWindow::Show( ShowFlags nFlags )
if (!xController->getDialog()->get_visible())
{
weld::DialogController::runAsync(xController,
- [this](sal_Int32 /*nResult*/){ xController->Close(); });
+ [this](sal_Int32 nResult) {
+ if (nResult == nCloseResponseToJustHide)
+ return;
+ xController->Close();
+ });
}
}
else