Prevent accidentally "checking" the folder when a folder exists with the same name as an asset (closes #2154)

This commit is contained in:
Alexander Bock
2022-06-20 14:02:34 +02:00
parent a9da9ca87b
commit 3184d0e619

View File

@@ -106,8 +106,8 @@ namespace {
for (int r = 0; r < nRows; r++) {
QModelIndex idx = model.index(r, 0, parent);
std::string assetName = model.name(idx).toStdString();
if (path == assetName) {
// Need to check if it actually is an asset to prevent isse #2154
if (model.isAsset(idx) && path == assetName) {
foundFileMatch = true;
model.setChecked(idx, true);
break;