From c2d5f6a2731d1eaf80058564755a4a3ad79984dd Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Thu, 16 Apr 2015 12:58:56 -0700 Subject: [PATCH] Add clearDefaultValue to reset in case of iffy default value --- src/FactSystem/FactMetaData.cc | 6 ++++++ src/FactSystem/FactMetaData.h | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/FactSystem/FactMetaData.cc b/src/FactSystem/FactMetaData.cc index ea46a6d39..bb5945baf 100644 --- a/src/FactSystem/FactMetaData.cc +++ b/src/FactSystem/FactMetaData.cc @@ -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; +} diff --git a/src/FactSystem/FactMetaData.h b/src/FactSystem/FactMetaData.h index dd185ac8c..2405198d6 100644 --- a/src/FactSystem/FactMetaData.h +++ b/src/FactSystem/FactMetaData.h @@ -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); -- 2.22.0