Ref T681, fixed handling of CG from DB

* consider settings
* remember DB CG data correctly
This commit is contained in:
Klaus Basan
2019-08-28 22:59:45 +02:00
parent 7831759a93
commit c26b6f7c85
3 changed files with 23 additions and 7 deletions

View File

@@ -864,7 +864,11 @@ namespace BlackCore
const CLength cgOvr = this->overriddenCGorDefault(simulatorCG, modelString);
if (!cgOvr.isNull() && !this->hasSameSimulatorCG(cgOvr, callsign))
{
this->insertCG(cgOvr, modelString, callsign); // per model string and CG
const CSimulatorSettings::CGSource source = this->getSimulatorSettings().getSimulatorSettings().getCGSource();
if (source != CSimulatorSettings::CGFromDBOnly)
{
this->insertCG(cgOvr, modelString, callsign); // per model string and CG
}
// here we know we have a valid model and CG did change
const CSimulatorInfo sim = this->getSimulatorInfo();