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 ) ...@@ -470,7 +470,10 @@ FileViewResult RemoteFilesDialog::OpenURL( OUString const & sURL )
if( eResult == eSuccess ) if( eResult == eSuccess )
{ {
m_pPath->SetURL( sURL ); m_pPath->SetURL( sURL );
m_pTreeView->SetSelectHdl( Link<>() );
m_pTreeView->SetTreePath( sURL ); m_pTreeView->SetTreePath( sURL );
m_pTreeView->SetSelectHdl( LINK( this, RemoteFilesDialog, TreeSelectHdl ) );
m_bIsConnected = true; m_bIsConnected = true;
EnableControls(); EnableControls();
...@@ -662,24 +665,17 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton, ...@@ -662,24 +665,17 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton,
IMPL_LINK_NOARG ( RemoteFilesDialog, DoubleClickHdl ) IMPL_LINK_NOARG ( RemoteFilesDialog, DoubleClickHdl )
{ {
SvTreeListEntry* pEntry = m_pFileView->FirstSelected(); if( m_pFileView->GetSelectionCount() )
if( pEntry )
{ {
SvtContentEntry* pData = static_cast< SvtContentEntry* >( pEntry->GetUserData() ); OUString sURL = m_pFileView->GetCurrentURL();
if( pData ) if( ContentIsFolder( sURL ) )
{ {
if( pData->mbIsFolder ) OpenURL( sURL );
{ }
OUString sURL = m_pFileView->GetCurrentURL(); else
{
OpenURL( sURL ); EndDialog( RET_OK );
}
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