Validate simulator info for model (used for quick mapping wizard)

This commit is contained in:
Klaus Basan
2019-03-23 19:53:29 +01:00
committed by Mat Sutcliffe
parent 3d563d9e7d
commit 88e82404e2
2 changed files with 15 additions and 1 deletions

View File

@@ -220,6 +220,16 @@ namespace BlackMisc
return e;
}
CStatusMessage CSimulatorInfo::validateSimulatorsForModel() const
{
CStatusMessage m(this);
if (!this->isAnySimulator()) { return m.validationError(u"No simulator"); }
if (this->isMicrosoftOrPrepare3DSimulator() && this->isXPlane()) { return m.validationError(u"Cannot combine XPlane and FS simulators"); }
if (this->isMicrosoftOrPrepare3DSimulator() && this->isFG()) { return m.validationError(u"Cannot combine FG and FS simulators"); }
if (this->isXPlane() && this->isFG()) { return m.validationError(u"Cannot combine FG and XPlane simulators"); }
return m.info(u"Simulators OK for model");
}
CSimulatorInfo::Simulator CSimulatorInfo::boolToFlag(bool fsx, bool fs9, bool xp, bool p3d, bool fg)
{
Simulator s = fsx ? FSX : None;