This commit is contained in:
Peter Hartmann 2025-01-23 11:19:54 +01:00
parent 376aa6bdf1
commit 736a5034de
1 changed files with 5 additions and 4 deletions

View File

@ -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() );
}
});
}