Do not override placement if shape is null

This commit is contained in:
wmayer 2012-05-01 12:20:12 +02:00
parent 3baa98cd90
commit 7c0aaa5814

View File

@ -103,9 +103,12 @@ void Feature::onChanged(const App::Property* prop)
}
else {
Base::Placement p;
p.fromMatrix(this->Shape.getShape().getTransform());
if (p != this->Placement.getValue())
this->Placement.setValue(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);
}
}
}