From: ouv Date: Mon, 10 Nov 2008 17:11:41 +0000 (+0000) Subject: Dump Python extension X-Git-Tag: TG_DumpPython_Extension_2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5cde5a8e1754e9897ae3bedf4e17c2e9f3cac933;p=modules%2Fgeom.git Dump Python extension --- diff --git a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx index 7f30a1a44..861743814 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx @@ -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; } //=================================================================================