From 183d3f58e7a1f9845e920683847b10f99a6e253b Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Sun, 7 May 2017 21:52:14 +0100 Subject: [PATCH] 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. --- src/blackmisc/simulation/xplane/aircraftmodelloaderxplane.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/blackmisc/simulation/xplane/aircraftmodelloaderxplane.cpp b/src/blackmisc/simulation/xplane/aircraftmodelloaderxplane.cpp index 957740ba1..e800c50cc 100644 --- a/src/blackmisc/simulation/xplane/aircraftmodelloaderxplane.cpp +++ b/src/blackmisc/simulation/xplane/aircraftmodelloaderxplane.cpp @@ -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); } }