From 136c993a32eff0d30ba0b051a7283605a50ca90b Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 27 Jul 2016 08:31:53 +0300 Subject: [PATCH] Issue #1660: Ability to change the deflection coefficient --- src/XGUI/XGUI_DeflectionDialog.cpp | 5 +++-- src/XGUI/XGUI_Workshop.cpp | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/XGUI/XGUI_DeflectionDialog.cpp b/src/XGUI/XGUI_DeflectionDialog.cpp index 11f93ff8d..158fdab99 100755 --- a/src/XGUI/XGUI_DeflectionDialog.cpp +++ b/src/XGUI/XGUI_DeflectionDialog.cpp @@ -8,7 +8,7 @@ #include -#include +#include #include #include @@ -22,7 +22,8 @@ XGUI_DeflectionDialog::XGUI_DeflectionDialog(QWidget* theParent) setWindowTitle("Deflection"); QGridLayout* aLay = new QGridLayout(this); - myDeflection = new QDoubleSpinBox(this); + myDeflection = new ModuleBase_DoubleSpinBox(this); + myDeflection->setDecimals(12); myDeflection->setRange(0, 1); aLay->addWidget(new QLabel("Deviation", this), 0, 0); aLay->addWidget(myDeflection, 0, 1); diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 0aa4a019e..6fe42a610 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -1246,6 +1246,8 @@ void XGUI_Workshop::onContextMenuCommand(const QString& theId, bool isChecked) moveObjects(); else if (theId == "COLOR_CMD") changeColor(aObjects); + else if (theId == "DEFLECTION_CMD") + changeDeflection(aObjects); else if (theId == "SHOW_CMD") { showObjects(aObjects, true); mySelector->updateSelectionBy(ModuleBase_ISelection::Browser); -- 2.39.2