From a5a596631807c90ad33d0237e12fdb1ee77193ae Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 19 Jun 2019 11:16:48 +0300 Subject: [PATCH] Make 0 transparency applicable --- src/XGUI/XGUI_CustomPrs.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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) -- 2.39.2