Salome HOME
PAL19669: sensitive zone of OK button is very small
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_RevolutionDlg.cxx
index 108a5f9ebc00524a041fd513796194483582c1c6..d5fe19e5fa9b6f3af983753a19bbfd3dbd5e80e9 100644 (file)
@@ -123,6 +123,8 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule )
   GroupArgumentsLayout->setSpacing(SPACING);
   GroupArgumentsLayout->setMargin(MARGIN);
 
+  myIdValidator = new SMESHGUI_IdValidator(this);
+
   // Controls for elements selection
   TextLabelElements = new QLabel(tr("SMESH_ID_ELEMENTS"), GroupArguments);
 
@@ -130,7 +132,7 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule )
   SelectElementsButton->setIcon(image2);
 
   LineEditElements  = new QLineEdit(GroupArguments);
-  LineEditElements->setValidator(new SMESHGUI_IdValidator(this));
+  LineEditElements->setValidator(myIdValidator);
 
   // Control for the whole mesh selection
   CheckBoxMesh = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
@@ -254,7 +256,7 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule )
 
   SpinBox_NbSteps->setRange(1, 999999);
 
-  SpinBox_Tolerance->RangeStepAndValidator(0.0, COORD_MAX, 0.1, 6);
+  SpinBox_Tolerance->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, 6);
 
   RadioButton1->setChecked(true);
 
@@ -852,6 +854,7 @@ void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh)
       aViewWindow->SetSelectionMode(ActorSelection);
     mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
     LineEditElements->setReadOnly(true);
+    LineEditElements->setValidator(0);
   } else {
     int aConstructorId = GetConstructorId();
     if (aConstructorId == 0)
@@ -866,6 +869,7 @@ void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh)
       }
 
     LineEditElements->setReadOnly(false);
+    LineEditElements->setValidator(myIdValidator);
     onTextChange(LineEditElements->text());
   }