Salome HOME
Dump Python extension
authorouv <ouv@opencascade.com>
Mon, 10 Nov 2008 17:11:41 +0000 (17:11 +0000)
committerouv <ouv@opencascade.com>
Mon, 10 Nov 2008 17:11:41 +0000 (17:11 +0000)
src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx

index 7f30a1a441cdec12375f43ffe4f5b97061e74886..8617438149e4b0b9d48ea06644b1eeaececb4091 100644 (file)
@@ -425,12 +425,16 @@ GEOM::GEOM_IOperations_ptr PrimitiveGUI_BoxDlg::createOperation()
 // function : isValid
 // purpose  :
 //=================================================================================
-bool PrimitiveGUI_BoxDlg::isValid (QString&)
+bool PrimitiveGUI_BoxDlg::isValid (QString& msg)
 {
-  return getConstructorId() == 0 ? !(myPoint1->_is_nil() || myPoint2->_is_nil()) :
-    GroupDimensions->SpinBox_DX->isValid() &&
-    GroupDimensions->SpinBox_DY->isValid() &&
-    GroupDimensions->SpinBox_DZ->isValid();
+  bool ok = true;
+  if( getConstructorId() == 1 )
+  {
+    ok = GroupDimensions->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
+    ok = GroupDimensions->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
+    ok = GroupDimensions->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
+  }
+  return getConstructorId() == 0 ? !(myPoint1->_is_nil() || myPoint2->_is_nil()) : ok;
 }
 
 //=================================================================================