Skip to content

Commit

Permalink
+ fixes #2118: Units conversion when using Imperial decimal (in/lb)
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Sep 15, 2015
1 parent 29f827a commit 2a56949
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/Mod/Sketcher/Gui/SketchOrientationDialog.cpp
Expand Up @@ -41,7 +41,6 @@ SketchOrientationDialog::SketchOrientationDialog(void)
: QDialog(Gui::getMainWindow()), ui(new Ui_SketchOrientationDialog)
{
ui->setupUi(this);
ui->Offset_doubleSpinBox->setDecimals(Base::UnitsApi::getDecimals());
onPreview();

connect(ui->Reverse_checkBox, SIGNAL(clicked(bool)), this, SLOT(onPreview()));
Expand All @@ -57,7 +56,7 @@ SketchOrientationDialog::~SketchOrientationDialog()

void SketchOrientationDialog::accept()
{
double offset = ui->Offset_doubleSpinBox->value();
double offset = ui->Offset_doubleSpinBox->value().getValue();
bool reverse = ui->Reverse_checkBox->isChecked();
if (ui->XY_radioButton->isChecked()) {
if (reverse) {
Expand Down
13 changes: 10 additions & 3 deletions src/Mod/Sketcher/Gui/SketchOrientationDialog.ui
Expand Up @@ -83,9 +83,9 @@
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="Offset_doubleSpinBox">
<property name="decimals">
<number>2</number>
<widget class="Gui::QuantitySpinBox" name="Offset_doubleSpinBox">
<property name="unit" stdset="0">
<string notr="true">mm</string>
</property>
<property name="minimum">
<double>-999999999.000000000000000</double>
Expand All @@ -112,6 +112,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>Gui::QuantitySpinBox</class>
<extends>QWidget</extends>
<header>Gui/QuantitySpinBox.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
Expand Down

0 comments on commit 2a56949

Please sign in to comment.