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