diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-11-16 15:21:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-11-16 21:37:58 +0100 |
commit | cd4a239063a77d49fe178255c20f0558e337a82f (patch) | |
tree | 794fd79d720f2761b6269752f86394028bbea847 /cui | |
parent | 54fd77a368208cc759024c05b7f1df7eb85d294e (diff) |
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@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/treeopt.cxx | 16 |
1 files changed, 13 insertions, 3 deletions
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); } } |