PartDesign: Fix revolution

It failed to close task if starting a body.
This commit is contained in:
DeepSOIC 2015-07-01 20:26:36 +03:00 committed by Stefan Tröger
parent f688546106
commit 34784b2d29

View File

@ -373,7 +373,11 @@ void TaskRevolutionParameters::apply()
App::DocumentObject* support = 0;
if (revolve->getTypeId().isDerivedFrom(PartDesign::Revolution::getClassTypeId())) {
sketch = static_cast<PartDesign::Revolution*>(revolve)->Sketch.getValue();
support = static_cast<PartDesign::Revolution*>(revolve)->getBaseObject();
try{//throws if no base
support = static_cast<PartDesign::Revolution*>(revolve)->getBaseObject();
} catch (Base::Exception) {
support = NULL;
}
}
//Gui::Command::openCommand("Revolution changed");