Skip to content

Commit

Permalink
fixes #2045: Make Euler Rotation default or user-pref default
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Oct 1, 2017
1 parent 397d7b7 commit de0ac35
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Gui/Placement.cpp
Expand Up @@ -34,6 +34,7 @@
#include <Gui/Document.h>
#include <Gui/Selection.h>
#include <Gui/ViewProvider.h>
#include <Gui/Window.h>
#include <App/Document.h>
#include <App/GeoFeature.h>
#include <App/PropertyGeo.h>
Expand Down Expand Up @@ -114,6 +115,11 @@ Placement::Placement(QWidget* parent, Qt::WindowFlags fl)
(boost::bind(&Placement::slotActiveDocument, this, _1));
App::Document* activeDoc = App::GetApplication().getActiveDocument();
if (activeDoc) documents.insert(activeDoc->getName());

ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("Placement");
long index = hGrp->GetInt("RotationMethod");
ui->rotationInput->setCurrentIndex(index);
ui->stackedWidget->setCurrentIndex(index);
}

Placement::~Placement()
Expand Down Expand Up @@ -363,6 +369,9 @@ bool Placement::onApply()
}
}

ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("Placement");
hGrp->SetInt("RotationMethod", ui->rotationInput->currentIndex());

return true;
}

Expand Down

0 comments on commit de0ac35

Please sign in to comment.