From bdd9ccc3f1a0db9345ad0a0109aa8b65405650ab Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 29 Oct 2020 16:01:02 +0000 Subject: move block for RET_OK conditional return into Ok handler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit making it clearer what happens on "ok", no logic change intended Change-Id: I1d57500d2fbeded4cd7c7fd48fd1f4296b78e41d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105018 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- cui/source/options/treeopt.cxx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'cui') diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 8ec8a0b3d252..5cb3fde4677b 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -738,6 +738,9 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, OKHdl_Impl, weld::Button&, void) ::svtools::executeRestartDialog(comphelper::getProcessComponentContext(), m_pParent, eRestartReason); } + + ApplyItemSets(); + utl::ConfigManager::storeConfigItems(); } void OfaTreeOptionsDialog::ApplyItemSets() @@ -1932,15 +1935,7 @@ short OfaTreeOptionsDialog::run() pClamp.reset( new SvxDicListChgClamp( xDictionaryList ) ); } - short nRet = SfxOkDialogController::run(); - - if( RET_OK == nRet ) - { - ApplyItemSets(); - utl::ConfigManager::storeConfigItems(); - } - - return nRet; + return SfxOkDialogController::run(); } // class ExtensionsTabPage ----------------------------------------------- -- cgit