diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-10-29 16:04:13 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-10-29 21:22:09 +0100 |
commit | 806c696ccdac69e274cbfeac0cb45ea59555c01d (patch) | |
tree | 3174adec9f456a060c9b71d00b6dc2cc88c5ffa8 /cui | |
parent | bdd9ccc3f1a0db9345ad0a0109aa8b65405650ab (diff) |
call ExtPage::DeactivatePage for apply as well as ok
I think the concerns at https://gerrit.libreoffice.org/c/core/+/54980/
are on balance overly conservative and its safer to make apply behave
the same as ok wrt that call
Change-Id: I889290c23dc9a7d4bb751769a509932142be5795
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105019
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/inc/treeopt.hxx | 2 | ||||
-rw-r--r-- | cui/source/options/treeopt.cxx | 11 |
2 files changed, 5 insertions, 8 deletions
diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx index e0ec4eb42354..4c7bfe8986ac 100644 --- a/cui/source/inc/treeopt.hxx +++ b/cui/source/inc/treeopt.hxx @@ -156,7 +156,7 @@ private: static VectorOfNodes LoadNodes( Module* pModule, const OUString& rExtensionId ); void InsertNodes( const VectorOfNodes& rNodeList ); - void ApplyOptions( bool deactivate ); + void ApplyOptions(); DECL_LINK(ShowPageHdl_Impl, weld::TreeView&, void); DECL_LINK(BackHdl_Impl, weld::Button&, void); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 5cb3fde4677b..7b537238f9c5 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -638,7 +638,7 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, BackHdl_Impl, weld::Button&, void) pPageInfo->m_xExtPage->ResetPage(); } -void OfaTreeOptionsDialog::ApplyOptions(bool deactivate) +void OfaTreeOptionsDialog::ApplyOptions() { std::unique_ptr<weld::TreeIter> xEntry = xTreeLB->make_iterator(); bool bEntry = xTreeLB->get_iter_first(*xEntry); @@ -658,10 +658,7 @@ void OfaTreeOptionsDialog::ApplyOptions(bool deactivate) if ( pPageInfo->m_xExtPage ) { - if ( deactivate ) - { - pPageInfo->m_xExtPage->DeactivatePage(); - } + pPageInfo->m_xExtPage->DeactivatePage(); pPageInfo->m_xExtPage->SavePage(); } if ( pPageInfo->m_xPage && RID_OPTPAGE_CHART_DEFCOLORS == pPageInfo->m_nPageId ) @@ -676,7 +673,7 @@ void OfaTreeOptionsDialog::ApplyOptions(bool deactivate) IMPL_LINK_NOARG(OfaTreeOptionsDialog, ApplyHdl_Impl, weld::Button&, void) { - ApplyOptions(/*deactivate =*/false); + ApplyOptions(); if ( bNeedsRestart ) { @@ -729,7 +726,7 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, OKHdl_Impl, weld::Button&, void) } } - ApplyOptions(/*deactivate =*/ true); + ApplyOptions(); m_xDialog->response(RET_OK); if ( bNeedsRestart ) |