diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-05 10:16:51 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-07-12 19:21:10 +0000 |
commit | bab5387447d2ea386b49367fe373b124a57c5ce6 (patch) | |
tree | 3fb133924f065ba911ec6d15c769b19f1549ccae | |
parent | e1e61bf5e5f368fc1ea579f8ae5eec9faafbd599 (diff) |
Resolves: rhbz#1352835 path options doesn't promptly destroy folder picker
(cherry picked from commit 3bbc0574d78d129359638b74612de2f93419eeb0)
Change-Id: I5133f63fd92f384221fa2812c6e2a0e7f3b37ac1
Reviewed-on: https://gerrit.libreoffice.org/26942
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r-- | cui/source/options/optpath.cxx | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 8695c0c2003b..5a0a87e69ae7 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -630,11 +630,12 @@ IMPL_LINK_NOARG_TYPED(SvxPathTabPage, PathHdl_Impl, Button*, void) else { short nRet = xFolderPicker->execute(); - if ( ExecutableDialogResults::OK != nRet ) - return; - - OUString sFolder( xFolderPicker->getDirectory() ); - ChangeCurrentEntry( sFolder ); + if (nRet == ExecutableDialogResults::OK) + { + OUString sFolder(xFolderPicker->getDirectory()); + ChangeCurrentEntry(sFolder); + } + xFolderPicker.clear(); } } catch( Exception& ) @@ -702,21 +703,17 @@ IMPL_LINK_TYPED( SvxPathTabPage, HeaderEndDrag_Impl, HeaderBar*, pBar, void ) } } - - IMPL_LINK_TYPED( SvxPathTabPage, DialogClosedHdl, DialogClosedEvent*, pEvt, void ) { - if ( RET_OK == pEvt->DialogResult ) + assert(xFolderPicker.is() && "SvxPathTabPage::DialogClosedHdl(): no folder picker"); + if (RET_OK == pEvt->DialogResult) { - DBG_ASSERT( xFolderPicker.is(), "SvxPathTabPage::DialogClosedHdl(): no folder picker" ); - OUString sURL = xFolderPicker->getDirectory(); ChangeCurrentEntry( sURL ); } + xFolderPicker.clear(); } - - void SvxPathTabPage::GetPathList( sal_uInt16 _nPathHandle, OUString& _rInternalPath, OUString& _rUserPath, OUString& _rWritablePath, bool& _rReadOnly ) |