Kaydet (Commit) f4c88188 authored tarafından Szymon Kłos's avatar Szymon Kłos

avoid multiple recursive opening the same url, cleaning

Change-Id: I8a3ae75a64ffcc4879af3e3591b3b433cee1678d
üst 52ead2fb
......@@ -470,7 +470,10 @@ FileViewResult RemoteFilesDialog::OpenURL( OUString const & sURL )
if( eResult == eSuccess )
{
m_pPath->SetURL( sURL );
m_pTreeView->SetSelectHdl( Link<>() );
m_pTreeView->SetTreePath( sURL );
m_pTreeView->SetSelectHdl( LINK( this, RemoteFilesDialog, TreeSelectHdl ) );
m_bIsConnected = true;
EnableControls();
......@@ -662,24 +665,17 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton,
IMPL_LINK_NOARG ( RemoteFilesDialog, DoubleClickHdl )
{
SvTreeListEntry* pEntry = m_pFileView->FirstSelected();
if( pEntry )
if( m_pFileView->GetSelectionCount() )
{
SvtContentEntry* pData = static_cast< SvtContentEntry* >( pEntry->GetUserData() );
OUString sURL = m_pFileView->GetCurrentURL();
if( pData )
if( ContentIsFolder( sURL ) )
{
if( pData->mbIsFolder )
{
OUString sURL = m_pFileView->GetCurrentURL();
OpenURL( sURL );
}
else
{
EndDialog( RET_OK );
}
OpenURL( sURL );
}
else
{
EndDialog( RET_OK );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment