X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_PropManager.cpp;h=480c1cdaea5f27ec6753c62d8fb30092719da45d;hb=refs%2Fheads%2FV9_11_BR;hp=a88a4024aa2c5dcc0884d78c6d85d7715468489e;hpb=50a8df0c6a66da8067b16155e5ae39f8f26a7ebc;p=modules%2Fshaper.git diff --git a/src/Config/Config_PropManager.cpp b/src/Config/Config_PropManager.cpp index a88a4024a..480c1cdae 100644 --- a/src/Config/Config_PropManager.cpp +++ b/src/Config/Config_PropManager.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2020 CEA/DEN, EDF R&D +// Copyright (C) 2014-2023 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -19,6 +19,8 @@ #include "Config_PropManager.h" +bool Config_PropManager::autoColorStatus = false; + std::vector stringToRGB(const std::string& theColor); int stringToInteger(const std::string& theInt); bool stringToBoolean(const std::string& theInt); @@ -28,6 +30,15 @@ Config_Properties& Config_PropManager::props() { 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, @@ -209,7 +220,7 @@ double Config_PropManager::stringToDouble(const std::string& theDouble) // 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, ".");