mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
X-Plane model loader: fixed malformed model strings with spurious multiple liveries.
Each livery was being appended to the model string of the previous livery model. Reported by Alex Beavil.
This commit is contained in:
@@ -269,11 +269,12 @@ namespace BlackMisc
|
||||
if (!model.hasDescription()) { model.setDescription(descriptionForFlyableModel(model)); }
|
||||
addUniqueModel(model, installedModels);
|
||||
|
||||
const QString baseModelString = model.getModelString();
|
||||
QDirIterator liveryIt(aircraftIt.fileInfo().canonicalPath() + "/liveries", QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
while (liveryIt.hasNext())
|
||||
{
|
||||
liveryIt.next();
|
||||
model.setModelString(model.getModelString() % ' ' % liveryIt.fileName());
|
||||
model.setModelString(baseModelString % ' ' % liveryIt.fileName());
|
||||
addUniqueModel(model, installedModels);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user