Core: avoid conversion from float to double or vice-versa
When synchronizing the Transparency property with the transparency value of the ShapeAppearance property then do not convert between float and double as otherwise some strange rounding issues can occur. Example: Set the Transparency property of an object to 35 in the Property Editor. After leaving the editor the value may switch to 34.
This commit is contained in:
@@ -3033,22 +3033,22 @@ const Color& PropertyMaterialList::getEmissiveColor(int index) const
|
||||
return _lValueList[index].emissiveColor;
|
||||
}
|
||||
|
||||
double PropertyMaterialList::getShininess() const
|
||||
float PropertyMaterialList::getShininess() const
|
||||
{
|
||||
return _lValueList[0].transparency;
|
||||
}
|
||||
|
||||
double PropertyMaterialList::getShininess(int index) const
|
||||
float PropertyMaterialList::getShininess(int index) const
|
||||
{
|
||||
return _lValueList[index].transparency;
|
||||
}
|
||||
|
||||
double PropertyMaterialList::getTransparency() const
|
||||
float PropertyMaterialList::getTransparency() const
|
||||
{
|
||||
return _lValueList[0].transparency;
|
||||
}
|
||||
|
||||
double PropertyMaterialList::getTransparency(int index) const
|
||||
float PropertyMaterialList::getTransparency(int index) const
|
||||
{
|
||||
return _lValueList[index].transparency;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user