From 01a2d10d1644b34b30f0fa92a111ecec8d4d36d2 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Tue, 2 Oct 2018 14:34:10 -0700 Subject: [PATCH] Fix Structure Height loading --- src/MissionManager/StructureScanComplexItem.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/MissionManager/StructureScanComplexItem.cc b/src/MissionManager/StructureScanComplexItem.cc index 100896efb..05666db86 100644 --- a/src/MissionManager/StructureScanComplexItem.cc +++ b/src/MissionManager/StructureScanComplexItem.cc @@ -147,8 +147,8 @@ void StructureScanComplexItem::save(QJsonArray& missionItems) saveObject[ComplexMissionItem::jsonComplexItemTypeKey] = jsonComplexItemTypeValue; saveObject[altitudeName] = _altitudeFact.rawValue().toDouble(); - saveObject[structureHeightName] = _structureHeightFact.rawValue().toDouble(); - saveObject[_jsonAltitudeRelativeKey] = _altitudeRelative; + saveObject[structureHeightName] = _structureHeightFact.rawValue().toDouble(); + saveObject[_jsonAltitudeRelativeKey] = _altitudeRelative; saveObject[layersName] = _layersFact.rawValue().toDouble(); QJsonObject cameraCalcObject; @@ -208,9 +208,11 @@ bool StructureScanComplexItem::load(const QJsonObject& complexObject, int sequen return false; } - _altitudeFact.setRawValue (complexObject[altitudeName].toDouble()); - _layersFact.setRawValue (complexObject[layersName].toDouble()); - _altitudeRelative = complexObject[_jsonAltitudeRelativeKey].toBool(true); + _altitudeFact.setRawValue (complexObject[altitudeName].toDouble()); + _layersFact.setRawValue (complexObject[layersName].toDouble()); + _structureHeightFact.setRawValue(complexObject[structureHeightName].toDouble()); + + _altitudeRelative = complexObject[_jsonAltitudeRelativeKey].toBool(true); if (!_structurePolygon.loadFromJson(complexObject, true /* required */, errorString)) { _structurePolygon.clear(); -- 2.22.0