Browse Source

Add clearDefaultValue to reset in case of iffy default value

QGC4.4
Don Gagne 10 years ago
parent
commit
c2d5f6a273
  1. 6
      src/FactSystem/FactMetaData.cc
  2. 5
      src/FactSystem/FactMetaData.h

6
src/FactSystem/FactMetaData.cc

@ -133,3 +133,9 @@ QVariant FactMetaData::_maxForType(void) @@ -133,3 +133,9 @@ QVariant FactMetaData::_maxForType(void)
// Make windows compiler happy, even switch is full cased
return QVariant();
}
void FactMetaData::clearDefaultValue(void)
{
_defaultValue = 0;
_defaultValueAvailable = false;
}

5
src/FactSystem/FactMetaData.h

@ -73,10 +73,9 @@ public: @@ -73,10 +73,9 @@ public:
void setUnits(const QString& units) { _units = units; }
void setMin(const QVariant& max);
void setMax(const QVariant& max);
/// Initialize the meta data given only the type.
void initFromTypeOnly(ValueType_t initType);
/// Used to clear a default value which it is found to possibly be invalid
void clearDefaultValue(void);
private:
QVariant _minForType(void);

Loading…
Cancel
Save