[Libreoffice-commits] core.git: cui/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 16 20:38:38 UTC 2020
cui/source/options/treeopt.cxx | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
New commits:
commit cd4a239063a77d49fe178255c20f0558e337a82f
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Nov 16 15:21:58 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Nov 16 21:37:58 2020 +0100
tdf#138049 different parents for restart dialog depending on ok vs apply
and in ok case hide the to-be-dismissed dialog before putting up
the next dialog
Change-Id: Ie9c0dfc1a7c10f8fd1d7a70749e07db123de2bf9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105951
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index e2ec8ed927dd..cd30560c3fd2 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -735,11 +735,21 @@ IMPL_LINK(OfaTreeOptionsDialog, ApplyHdl_Impl, weld::Button&, rButton, void)
SelectHdl_Impl();
}
- if ( bNeedsRestart )
+ if (bNeedsRestart)
{
SolarMutexGuard aGuard;
- ::svtools::executeRestartDialog(comphelper::getProcessComponentContext(),
- m_pParent, eRestartReason);
+ weld::Window* pParent;
+ if (!bOkPressed)
+ pParent = m_xDialog.get();
+ else
+ {
+ m_xDialog->hide();
+ pParent = m_pParent;
+ }
+ bool bRestart = ::svtools::executeRestartDialog(comphelper::getProcessComponentContext(),
+ pParent, eRestartReason);
+ if (bRestart && !bOkPressed)
+ m_xDialog->response(RET_OK);
}
}
More information about the Libreoffice-commits
mailing list