Mod: catch exception raised by Rotation::setValue

This commit is contained in:
wmayer
2023-03-01 17:43:04 +01:00
committed by wwmayer
parent f195c3a0ca
commit c770e1b677
5 changed files with 59 additions and 34 deletions

View File

@@ -69,10 +69,14 @@ void Feature::onChanged(const App::Property* prop)
}
// if the mesh data has changed check and adjust the transformation as well
else if (prop == &this->Mesh) {
Base::Placement p;
p.fromMatrix(this->Mesh.getTransform());
if (p != this->Placement.getValue())
this->Placement.setValue(p);
try {
Base::Placement p;
p.fromMatrix(this->Mesh.getTransform());
if (p != this->Placement.getValue())
this->Placement.setValue(p);
}
catch (const Base::ValueError&) {
}
}
// Note: If the Mesh property has changed the property and this object are marked as 'touched'