Fix loading file from the recent file list when drag and drop

This commit is contained in:
jfmcarreira committed 2014-10-09 11:05:09 +01:00
1 parent 59559b7a78
commit 7c7499714f
1 file changed
+7 -5
+7 -5
View File
@@ -167,6 +167,12 @@ Void plaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* streamInfo )
}
interfaceChild = new SubWindowHandle( this ); //createSubWindow();
Bool retChild = false;
if( !streamInfo )
{
Int idx = findPlaYUVerStreamInfo( m_aRecentFileStreamInfo, fileName );
streamInfo = idx >= 0 ? &m_aRecentFileStreamInfo.at( idx ) : NULL;
}
if( !streamInfo )
retChild = interfaceChild->loadFile( fileName );
else
@@ -239,11 +245,7 @@ Void plaYUVerApp::open()
if( !fileNameList.at( i ).isEmpty() )
{
m_cLastOpenPath = QFileInfo( fileNameList.at( i ) ).path();
Int idx = findPlaYUVerStreamInfo( m_aRecentFileStreamInfo, fileNameList.at( i ) );
if( idx >= 0 )
loadFile( fileNameList.at( i ), (PlaYUVerStreamInfo*) &m_aRecentFileStreamInfo.at( idx ) );
else
loadFile( fileNameList.at( i ) );
loadFile( fileNameList.at( i ) );
}
}
}