Corrections for bug IPAL12999.

This commit is contained in:
skl 2006-07-20 07:05:38 +00:00
parent 8ca4c231a8
commit c759def283

View File

@ -272,10 +272,7 @@ bool GEOM_Object::IsMainShape()
Handle(GEOM_Function) GEOM_Object::AddFunction(const Standard_GUID& theGUID, int theFunctionType) Handle(GEOM_Function) GEOM_Object::AddFunction(const Standard_GUID& theGUID, int theFunctionType)
{ {
Standard_Integer nb = GetNbFunctions(); Standard_Integer nb = GetNbFunctions();
if(nb == 1 && theGUID == GetSubShapeID()) return NULL; //It's impossible to add a function to sub shape
//if(nb == 1 && theGUID == GetSubShapeID()) return NULL; //It's impossible to add a function to sub shape
// change by skl (+srn) for IPAL12999
if(nb == 1 && GetFunction(1)->GetDriverGUID() == GetSubShapeID()) return NULL; //It's impossible to add a function to sub shape
nb++; nb++;
TDF_Label aChild = FUNCTION_LABEL(nb); TDF_Label aChild = FUNCTION_LABEL(nb);