Fix pb with default value in the "Glue faces" dialog box.

This commit is contained in:
vsr 2008-06-25 09:33:52 +00:00
parent 270ce81685
commit 84d8f5cf5c

View File

@ -392,7 +392,15 @@ GEOM::GEOM_IOperations_ptr RepairGUI_GlueDlg::createOperation()
//================================================================================= //=================================================================================
bool RepairGUI_GlueDlg::isValid( QString& msg ) 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: case 0:
{ {
GEOM::GEOM_Object_var anObj = GEOM::GEOM_IShapesOperations::_narrow 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(); aResult = !anObj->_is_nil();
if ( aResult ) if ( aResult )
objects.push_back( anObj._retn() ); objects.push_back( anObj._retn() );