[FEM] fix transparency bug

- as reported here: https://forum.freecadweb.org/viewtopic.php?p=582526#p582526
After setting the transparency, the object has to be redrawn

- also remove a doubled header
This commit is contained in:
Uwe
2022-03-24 04:50:54 +01:00
parent 2eb3447694
commit ceb5a3da5c
2 changed files with 2 additions and 4 deletions

View File

@@ -336,7 +336,6 @@ void ViewProviderFemPostObject::update3D() {
WritePointData(points, normals, tcoords);
bool ResetColorBarRange = true;
WriteColorData(ResetColorBarRange);
WriteTransparency();
// write out polys if any
if (pd->GetNumberOfPolys() > 0) {
@@ -532,8 +531,9 @@ void ViewProviderFemPostObject::WriteColorData(bool ResetColorBarRange) {
void ViewProviderFemPostObject::WriteTransparency() {
float trans = float(Transparency.getValue()) / 100.;
float trans = float(Transparency.getValue()) / 100.0;
m_material->transparency.setValue(trans);
update3D();
}
void ViewProviderFemPostObject::updateData(const App::Property* p) {