Salome HOME
Change translation
[modules/shaper.git] / src / XGUI / XGUI_CustomPrs.cpp
index 1ce2a99021150a53dae61bcb45297cde23b35a17..f3bd68300687122be19c59e1401ffa328eb69b85 100644 (file)
@@ -119,23 +119,21 @@ 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)
 {
-  return Config_PropManager::real("Visualization", "default_transparency");
+  return Config_PropManager::integer("Visualization", "shaper_default_transparency") / 100.;
 }
 
 XGUI_CustomPrs::XGUI_CustomPrs(XGUI_Workshop* theWorkshop)