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

@@ -544,9 +544,13 @@ void Feature::onChanged(const App::Property* prop)
Base::Placement p;
// shape must not be null to override the placement
if (!this->Shape.getValue().IsNull()) {
p.fromMatrix(this->Shape.getShape().getTransform());
if (p != this->Placement.getValue())
this->Placement.setValue(p);
try {
p.fromMatrix(this->Shape.getShape().getTransform());
if (p != this->Placement.getValue())
this->Placement.setValue(p);
}
catch (const Base::ValueError&) {
}
}
}
}