From: vsv Date: Wed, 11 Jul 2018 12:16:16 +0000 (+0300) Subject: Issue #2566: Set color on attribute if color of presentation has to be not default X-Git-Tag: SHAPER_V9_1_0RC1~135 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5b0181824b3e43792cd4487f6ba8fdf04f569bfc;p=modules%2Fshaper.git Issue #2566: Set color on attribute if color of presentation has to be not default --- diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 329eb0bf5..bd06498f2 100755 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -71,6 +71,7 @@ #include #include #include +#include #include #include @@ -1218,6 +1219,11 @@ bool PartSet_Module::afterCustomisePresentation(std::shared_ptr // customize sketch dimension constraint presentation if (!aCustomized) { if (!aColor.empty()) { // otherwise presentation has the default color + AttributeIntArrayPtr aColorAttr = theResult->data()->intArray(ModelAPI_Result::COLOR_ID()); + aColorAttr->setSize(3); + // Set the color attribute in order do not use default colors in the perasentation object + for (int i = 0; i < 3; i++) + aColorAttr->setValue(i, aColor[i]); aCustomized = thePrs->setColor(aColor[0], aColor[1], aColor[2]); } }