Browse Source

FactMetaData: Fix default for decimal places (#10589)

When metadata was loaded from JSON and decimal places weren't
specified it was set to 0 when it should have been set to
kUknownDecimalPlaces (which will in turn default to 3).

---------

Co-authored-by: Don Gagne <dongagne@outlook.com>
QGC4.4
Don Gagne 2 years ago committed by GitHub
parent
commit
ad62e5533b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/FactSystem/FactMetaData.cc

2
src/FactSystem/FactMetaData.cc

@ -1337,7 +1337,7 @@ FactMetaData* FactMetaData::createFromJsonObject(const QJsonObject& json, QMap<Q
} }
} }
metaData->setDecimalPlaces(json[_decimalPlacesJsonKey].toInt(0)); metaData->setDecimalPlaces(json[_decimalPlacesJsonKey].toInt(kUnknownDecimalPlaces));
metaData->setShortDescription(json[_shortDescriptionJsonKey].toString()); metaData->setShortDescription(json[_shortDescriptionJsonKey].toString());
metaData->setLongDescription(json[_longDescriptionJsonKey].toString()); metaData->setLongDescription(json[_longDescriptionJsonKey].toString());

Loading…
Cancel
Save