From: vsr Date: Wed, 25 Jun 2008 09:33:52 +0000 (+0000) Subject: Fix pb with default value in the "Glue faces" dialog box. X-Git-Tag: V4_1_4a1~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=84d8f5cf5ce269e60e5123b7e342dc5fb09d411c;p=modules%2Fgeom.git Fix pb with default value in the "Glue faces" dialog box. --- diff --git a/src/RepairGUI/RepairGUI_GlueDlg.cxx b/src/RepairGUI/RepairGUI_GlueDlg.cxx index a34019dc4..39451a1e2 100644 --- a/src/RepairGUI/RepairGUI_GlueDlg.cxx +++ b/src/RepairGUI/RepairGUI_GlueDlg.cxx @@ -392,7 +392,15 @@ GEOM::GEOM_IOperations_ptr RepairGUI_GlueDlg::createOperation() //================================================================================= bool RepairGUI_GlueDlg::isValid( QString& msg ) { - return !myObject->_is_nil() && ( IsPreview() || myTolEdt->value() > 0. ); + double v = 0; + switch ( getConstructorId() ) + { + case 0: + v = myTolEdt->value(); break; + case 1: + v = myTolEdt2->value(); break; + } + return !myObject->_is_nil() && ( IsPreview() || v > 0. ); } //================================================================================= @@ -409,7 +417,7 @@ bool RepairGUI_GlueDlg::execute( ObjectList& objects ) case 0: { GEOM::GEOM_Object_var anObj = GEOM::GEOM_IShapesOperations::_narrow - ( getOperation() )->MakeGlueFaces( myObject, myTolEdt2->value(), true ); + ( getOperation() )->MakeGlueFaces( myObject, myTolEdt->value(), true ); aResult = !anObj->_is_nil(); if ( aResult ) objects.push_back( anObj._retn() );