X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2FModel%2FModel_ResultBody.cpp;h=2bdea7f5f30bdf54fbd2db814dccdc2b16615f1e;hb=e3c21b331e4ec138aec5efcb51e19d6afee46193;hp=784eff153c53703fa6c1e4cb4cbca58b5e721d51;hpb=31e91a8d11e03ddce87e8c2aa04695961a266a97;p=modules%2Fshaper.git diff --git a/src/Model/Model_ResultBody.cpp b/src/Model/Model_ResultBody.cpp index 784eff153..2bdea7f5f 100644 --- a/src/Model/Model_ResultBody.cpp +++ b/src/Model/Model_ResultBody.cpp @@ -44,16 +44,17 @@ Model_ResultBody::Model_ResultBody() void Model_ResultBody::initAttributes() { - // append the color attribute + // append the color attribute. It is empty, the attribute will be filled by a request DataPtr aData = data(); aData->addAttribute(COLOR_ID(), ModelAPI_AttributeIntArray::type()); - AttributeIntArrayPtr aColorAttr = aData->intArray(COLOR_ID()); - std::vector aRGB; - aRGB = Config_PropManager::color("Visualization", "result_body_color", DEFAULT_COLOR()); - aColorAttr->setSize(3); - aColorAttr->setValue(0, aRGB[0]); - aColorAttr->setValue(1, aRGB[1]); - aColorAttr->setValue(2, aRGB[2]); +} + +void Model_ResultBody::colorConfigInfo(std::string& theSection, std::string& theName, + std::string& theDefault) +{ + theSection = "Visualization"; + theName = "result_body_color"; + theDefault = DEFAULT_COLOR(); } void Model_ResultBody::store(const std::shared_ptr& theShape)