[Libreoffice-commits] core.git: Branch 'libreoffice-5-2-0' - cui/source

Caolán McNamara caolanm at redhat.com
Wed Jul 13 20:17:40 UTC 2016


 cui/source/options/optpath.cxx |   19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

New commits:
commit 5a41fcfc9ff90945fe1a240f0125478cdac05028
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jul 5 10:16:51 2016 +0100

    Resolves: rhbz#1352835 path options doesn't promptly destroy folder picker
    
    Change-Id: I5133f63fd92f384221fa2812c6e2a0e7f3b37ac1
    (cherry picked from commit 3bbc0574d78d129359638b74612de2f93419eeb0)
    Reviewed-on: https://gerrit.libreoffice.org/26941
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 18b904faafb756fd28d40467153d191122f6a731)
    Reviewed-on: https://gerrit.libreoffice.org/27123
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 2a52540..7c2de67 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -633,11 +633,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& )
@@ -721,19 +722,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 )


More information about the Libreoffice-commits mailing list