App/Gui: add new ObjectStatus TouchOnColorChange

For triggering recompute on color changes
This commit is contained in:
Zheng, Lei
2021-10-18 17:03:14 +08:00
committed by Chris Hennes
parent 611e79af53
commit c37c8658c4
3 changed files with 10 additions and 0 deletions

View File

@@ -157,6 +157,8 @@ void ViewProviderGeometryObject::onChanged(const App::Property* prop)
}
}
else if (prop == &ShapeMaterial) {
if (getObject() && getObject()->testStatus(App::ObjectStatus::TouchOnColorChange))
getObject()->touch(true);
const App::Material& Mat = ShapeMaterial.getValue();
long value = (long)(100*Mat.transparency);
if (value != Transparency.getValue())