Fixed bugs in Transformed features

This commit is contained in:
Jan Rheinländer
2014-05-19 21:43:59 +02:00
committed by Stefan Tröger
parent 354e7dfa87
commit 7790513a38
3 changed files with 13 additions and 7 deletions

View File

@@ -393,10 +393,11 @@ bool TaskDlgMirroredParameters::accept()
App::DocumentObject* obj;
mirrorParameter->getMirrorPlane(obj, mirrorPlanes);
std::string mirrorPlane = getPythonStr(obj, mirrorPlanes);
if (!mirrorPlane.empty()) {
if (!mirrorPlane.empty() && obj) {
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.MirrorPlane = %s", name.c_str(), mirrorPlane.c_str());
} else
} else {
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.MirrorPlane = None", name.c_str());
}
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.recompute()");
if (!TransformedView->getObject()->isValid())
throw Base::Exception(TransformedView->getObject()->getStatusString());