X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_ResultGroup.cpp;h=39809bade0444a0a964855077dd8926599024119;hb=cf042069d9ec6ec86389945f6973d338b6e6d753;hp=a0a5922cd056249e7e3fbec64597e0d29d63dd08;hpb=51946078419dc8b23701496c09e689c8abdfc897;p=modules%2Fshaper.git diff --git a/src/Model/Model_ResultGroup.cpp b/src/Model/Model_ResultGroup.cpp index a0a5922cd..39809bade 100644 --- a/src/Model/Model_ResultGroup.cpp +++ b/src/Model/Model_ResultGroup.cpp @@ -20,16 +20,17 @@ Model_ResultGroup::Model_ResultGroup(std::shared_ptr theOwnerData void Model_ResultGroup::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_group_color", DEFAULT_COLOR()); - aColorAttr->setSize(3); - aColorAttr->setValue(0, aRGB[0]); - aColorAttr->setValue(1, aRGB[1]); - aColorAttr->setValue(2, aRGB[2]); + aData->addAttribute(COLOR_ID(), ModelAPI_AttributeIntArray::typeId()); +} + +void Model_ResultGroup::colorConfigInfo(std::string& theSection, std::string& theName, + std::string& theDefault) +{ + theSection = "Visualization"; + theName = "result_group_color"; + theDefault = DEFAULT_COLOR(); } std::shared_ptr Model_ResultGroup::shape()