I think this prevents a potential crash.

This commit is contained in:
Martín Lucas Golini
2025-04-01 19:29:34 -03:00
parent a9fa290be8
commit 577f2e3dbb

View File

@@ -26,11 +26,9 @@ FileSystemModel::Node::Node( const std::string& rootPath, FileSystemModel& model
if ( threadPool ) {
mQueuedForTraversal = true;
threadPool->run( [this, &model]() {
auto rowCount = model.rowCount();
traverseIfNeeded( model );
model.refreshView();
if ( rowCount != model.rowCount() )
model.invalidate( Model::DontInvalidateIndexes );
model.invalidate( Model::DontInvalidateIndexes );
} );
} else {
traverseIfNeeded( model );