]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx
Salome HOME
Issue 0020580: improved validation in integer and double spin boxes, possibility...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MakeNodeAtPointDlg.cxx
index 9fbdc9df0b9a21b8df3020cf60518e1258232a1a..b2b362d95dc42c5ef96541258247f2f1d046968a 100644 (file)
@@ -147,9 +147,9 @@ QWidget* SMESHGUI_MakeNodeAtPointDlg::createMainFrame (QWidget* theParent)
   QLabel* aZLabel = new QLabel(tr("SMESH_Z"), aCoordGrp);
   myZ = new SMESHGUI_SpinBox(aCoordGrp);
 
-  myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
-  myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
-  myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
+  myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
 
   aCoordGrpLayout->addWidget(myCoordBtn);
   aCoordGrpLayout->addWidget(aXLabel);
@@ -367,7 +367,7 @@ bool SMESHGUI_MakeNodeAtPointOp::onApply()
 
   if ( !myMeshActor ) {
     SUIT_MessageBox::warning( dlg(), tr( "SMESH_WRN_WARNING" ),
-                             tr("INVALID_MESH") );
+                              tr("INVALID_MESH") );
     dlg()->show();
     return false;
   }
@@ -376,7 +376,7 @@ bool SMESHGUI_MakeNodeAtPointOp::onApply()
   if ( !isValid( msg ) ) { // node id is invalid
     if( !msg.isEmpty() )
       SUIT_MessageBox::warning( dlg(), tr( "SMESH_WRN_WARNING" ),
-                               tr("INVALID_ID") );
+                                tr("INVALID_ID") );
     dlg()->show();
     return false;
   }
@@ -386,7 +386,7 @@ bool SMESHGUI_MakeNodeAtPointOp::onApply()
     SMESH::SMESH_Mesh_var aMesh = SMESH::GetMeshByIO(myMeshActor->getIO());
     if (aMesh->_is_nil()) {
       SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
-                                  tr("SMESHG_NO_MESH") );
+                                   tr("SMESHG_NO_MESH") );
       return true;
     }
     SMESH::SMESH_MeshEditor_var aMeshEditor = aMesh->GetMeshEditor();
@@ -414,7 +414,7 @@ bool SMESHGUI_MakeNodeAtPointOp::onApply()
       aParameters << myDlg->myX->text();
       aParameters << myDlg->myY->text();
       aParameters << myDlg->myZ->text();
-      aMesh->SetParameters( SMESHGUI::JoinObjectParameters(aParameters) );
+      aMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
 
       myDlg->myId->setText("");