+ use undo/redo for Fem constraint force dialog

This commit is contained in:
wmayer
2015-02-27 11:21:05 +01:00
parent 36e4758b72
commit 6721139630
3 changed files with 25 additions and 0 deletions

View File

@@ -82,6 +82,10 @@ void ConstraintForce::onChanged(const App::Property* prop)
direction = -direction;
DirectionVector.setValue(direction);
} else if (prop == &Reversed) {
// if the direction is invalid try to compute it again
if (naturalDirectionVector.Length() < Precision::Confusion()) {
naturalDirectionVector = getDirection(Direction);
}
if (naturalDirectionVector.Length() >= Precision::Confusion()) {
if (Reversed.getValue() && (DirectionVector.getValue() == naturalDirectionVector)) {
DirectionVector.setValue(-naturalDirectionVector);