Salome HOME
Issue #1660: Ability to change the deflection coefficient
authornds <nds@opencascade.com>
Wed, 27 Jul 2016 05:31:53 +0000 (08:31 +0300)
committernds <nds@opencascade.com>
Wed, 27 Jul 2016 05:31:53 +0000 (08:31 +0300)
src/XGUI/XGUI_DeflectionDialog.cpp
src/XGUI/XGUI_Workshop.cpp

index 11f93ff8d2c1803cd52ab3025ccca2c2d7c56989..158fdab991d08493bf90bdc57014f09a0c60831c 100755 (executable)
@@ -8,7 +8,7 @@
 
 #include <ModelAPI_Tools.h>
 
-#include <QDoubleSpinBox>
+#include <ModuleBase_DoubleSpinBox.h>
 
 #include <QLabel>
 #include <QButtonGroup>
@@ -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);
index 0aa4a019e8eabbaac6bdfaf9fd44e80dc7e327ff..6fe42a6101b6edc439e9b10233570f47f8aeb846 100755 (executable)
@@ -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);