Commit 76215f0a authored by Valentin Platzgummer's avatar Valentin Platzgummer

Measurement Complex Item load -> sync issue (tile alt = nan) solved

parent c508913f
......@@ -497,7 +497,7 @@ void MeasurementComplexItem::save(QJsonArray &planItems) {
// Variant names.
QJsonArray jsonVariantNames;
for (auto const &name : _variantNames) {
for (auto &&name : _variantNames) {
jsonVariantNames.append(name);
}
saveObject[variantNamesKey] = jsonVariantNames;
......@@ -1209,7 +1209,7 @@ bool MeasurementComplexItem::stopEditing(bool doUpdate) {
_updateRoute();
}
if (correct && isDifferent) {
if (correct) {
_syncTiles();
}
......
......@@ -40,8 +40,15 @@ bool GeoArea::loadFromJson(const QJsonObject &json, QString &errorString) {
errorString)) {
qWarning() << errorString;
return false;
}
} else {
// set altitude to 0
for (int i = 0; i < this->count(); ++i) {
auto vertex = this->vertexCoordinate(i);
vertex.setAltitude(0);
this->adjustVertex(i, vertex);
}
}
return true;
}
......
......@@ -105,7 +105,7 @@ template <class T> bool toJson(const T &p, QJsonObject &value) {
p, traits::Type2Type<Components>()); // If T has no member altitude()
// replace it by 0.0;
value[altKey] = altitude;
value[altKey] = double(altitude);
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment