improve
This commit is contained in:
parent
376aa6bdf1
commit
736a5034de
|
@ -272,14 +272,15 @@ namespace
|
|||
QObject::connect( m_model, &QFileSystemModel::directoryLoaded,
|
||||
this, &FileSelectionWindow< W >::loadContents );
|
||||
|
||||
QObject::connect( m_model, &QFileSystemModel::rootPathChanged,
|
||||
this, &FileSelectionWindow< W >::loadContents );
|
||||
|
||||
QObject::connect( m_listBox, &QskSimpleListBox::selectedEntryChanged,
|
||||
this, [this]( const QString& path )
|
||||
{
|
||||
QFileInfo fi( m_model->rootPath(), path );
|
||||
m_model->setRootPath( fi.absoluteFilePath() );
|
||||
|
||||
if( fi.isDir() )
|
||||
{
|
||||
m_model->setRootPath( fi.absoluteFilePath() );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue