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

@@ -462,10 +462,11 @@ void TaskLinearPatternParameters::apply()
App::DocumentObject* obj;
getDirection(obj, directions);
std::string direction = getPythonStr(obj, directions);
if (!direction.empty()) {
if (!direction.empty() && obj) {
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Direction = %s", name.c_str(), direction.c_str());
} else
} else {
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Direction = None", name.c_str());
}
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Reversed = %u",name.c_str(),getReverse());
ui->spinLength->apply();