-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include "Config_PropManager.h"
+bool Config_PropManager::autoColorStatus = false;
+
std::vector<int> stringToRGB(const std::string& theColor);
int stringToInteger(const std::string& theInt);
bool stringToBoolean(const std::string& theInt);
return *confProps;
}
+bool Config_PropManager::getAutoColorStatus()
+{
+ return Config_PropManager::autoColorStatus;
+}
+
+void Config_PropManager::setAutoColorStatus(const bool theValue)
+{
+ Config_PropManager::autoColorStatus = theValue;
+}
Config_Prop* Config_PropManager::registerProp(const std::string& theSection,
const std::string& theName,
aProp->setType(theType);
aProp->setTitle(theTitle);
}
- aProp->setMin(theMin);
- aProp->setMax(theMax);
+ if (theMin != "")
+ aProp->setMin(theMin);
+ if (theMax != "")
+ aProp->setMax(theMax);
}
else {
aProp =
// change locale and convert "," to "." if exists
std::string aCurLocale = setlocale(LC_NUMERIC, 0);
setlocale(LC_NUMERIC, "C");
- int dotpos = (int)aStr.find(',');
+ size_t dotpos = aStr.find(',');
if (dotpos != std::string::npos)
aStr.replace(dotpos, 1, ".");