From: vsv Date: Wed, 19 Jun 2019 08:16:48 +0000 (+0300) Subject: Make 0 transparency applicable X-Git-Tag: VEDF2019Lot4~106 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a5a596631807c90ad33d0237e12fdb1ee77193ae;p=modules%2Fshaper.git Make 0 transparency applicable --- diff --git a/src/XGUI/XGUI_CustomPrs.cpp b/src/XGUI/XGUI_CustomPrs.cpp index 1ce2a9902..0090ba420 100644 --- a/src/XGUI/XGUI_CustomPrs.cpp +++ b/src/XGUI/XGUI_CustomPrs.cpp @@ -119,18 +119,16 @@ double XGUI_CustomPrs::getDefaultDeflection(const ObjectPtr& theObject) double getTransparency(const ResultPtr& theResult) { - double aDeflection = -1; + double aTransparency = -1; // get transparency from the attribute of the result if (theResult.get() != NULL && theResult->data()->attribute(ModelAPI_Result::TRANSPARENCY_ID()).get() != NULL) { AttributeDoublePtr aDoubleAttr = theResult->data()->real(ModelAPI_Result::TRANSPARENCY_ID()); if (aDoubleAttr.get() && aDoubleAttr->isInitialized()) { - double aValue = aDoubleAttr->value(); - if (aValue > 0) /// zero value should not be used as a transparency(previous studies) - aDeflection = aDoubleAttr->value(); + aTransparency = aDoubleAttr->value(); } } - return aDeflection; + return aTransparency; } double getDefaultTransparency(const ResultPtr& theResult)