From 84d8f5cf5ce269e60e5123b7e342dc5fb09d411c Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 25 Jun 2008 09:33:52 +0000 Subject: [PATCH] Fix pb with default value in the "Glue faces" dialog box. --- src/RepairGUI/RepairGUI_GlueDlg.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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() ); -- 2.39.2