From 5cde5a8e1754e9897ae3bedf4e17c2e9f3cac933 Mon Sep 17 00:00:00 2001 From: ouv Date: Mon, 10 Nov 2008 17:11:41 +0000 Subject: [PATCH] Dump Python extension --- src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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; } //================================================================================= -- 2.39.2