Fixed bugs in Transformed features

This commit is contained in:
Jan Rheinländer
2016-04-12 18:12:01 +02:00
committed by Stefan Tröger
parent 35e35527db
commit 0ddff2419f
3 changed files with 13 additions and 7 deletions
@@ -385,11 +385,15 @@ void TaskPolarPatternParameters::changeEvent(QEvent *e)
void TaskPolarPatternParameters::apply()
{
std::string name = TransformedView->getObject()->getNameInDocument();
std::string axis = getAxis();
if (!axis.empty()) {
std::vector<std::string> axes;
App::DocumentObject* obj;
getAxis(obj, axes);
std::string axis = getPythonStr(obj, axes);
if (!axis.empty() && obj) {
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Axis = %s", name.c_str(), axis.c_str());
} else
} else {
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Axis = None", name.c_str());
}
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Reversed = %u",name.c_str(),getReverse());
ui->polarAngle->apply();
ui->spinOccurrences->apply();