X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_ResultGroup.cpp;h=87210b5c52a61ccd4b9fdf5b48a3e924e7ef9056;hb=refs%2Ftags%2FV_1.2.1;hp=a0a5922cd056249e7e3fbec64597e0d29d63dd08;hpb=31e91a8d11e03ddce87e8c2aa04695961a266a97;p=modules%2Fshaper.git diff --git a/src/Model/Model_ResultGroup.cpp b/src/Model/Model_ResultGroup.cpp index a0a5922cd..87210b5c5 100644 --- a/src/Model/Model_ResultGroup.cpp +++ b/src/Model/Model_ResultGroup.cpp @@ -14,22 +14,24 @@ Model_ResultGroup::Model_ResultGroup(std::shared_ptr theOwnerData) { + myIsDisabled = true; // by default it is not initialized and false to be after created setIsConcealed(false); myOwnerData = 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()