From: nds Date: Wed, 27 Jul 2016 05:31:53 +0000 (+0300) Subject: Issue #1660: Ability to change the deflection coefficient X-Git-Tag: V_2.5.0~166 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=136c993a32eff0d30ba0b051a7283605a50ca90b;p=modules%2Fshaper.git Issue #1660: Ability to change the deflection coefficient --- 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);