Add X-Plane object version into the model description

This commit is contained in:
Roland Winklmeier
2018-09-04 14:37:47 +02:00
committed by Klaus Basan
parent 01779183c4
commit dbbc459dbc
2 changed files with 14 additions and 1 deletions

View File

@@ -288,7 +288,10 @@ namespace BlackMisc
model.setLivery(livery);
model.setSimulator(CSimulatorInfo::xplane());
model.setDescription("[CSL]");
QString modelDescription("[CSL]");
if (plane.objectVersion == CSLPlane::OBJ7) { modelDescription += "[OBJ7]"; }
else if (plane.objectVersion == CSLPlane::OBJ8) { modelDescription += "[OBJ8]"; }
model.setDescription(modelDescription);
installedModels.push_back(model);
}
}
@@ -421,6 +424,7 @@ namespace BlackMisc
package.planes.back().objectName = fileInfo.completeBaseName();
package.planes.back().textureName = texture;
package.planes.back().filePath = fullPath;
package.planes.back().objectVersion = CSLPlane::OBJ7;
return true;
}
@@ -512,6 +516,7 @@ namespace BlackMisc
package.planes.back().dirNames = dirNames;
package.planes.back().objectName = fileInfo.completeBaseName();
package.planes.back().filePath = fullPath;
package.planes.back().objectVersion = CSLPlane::OBJ8;
if (tokens.size() >= 5)
{

View File

@@ -64,6 +64,12 @@ namespace BlackMisc
//! CSL Plane data
struct CSLPlane
{
enum ObjectVersion
{
OBJ7,
OBJ8
};
QString getModelName() const;
// Model name parts
@@ -75,6 +81,8 @@ namespace BlackMisc
QString icao; //!< Icao type of this model
QString airline; //!< Airline identifier. Can be empty.
QString livery; //!< Livery identifier. Can be empty.
ObjectVersion objectVersion;
};
//! CSL package