mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-18 10:00:33 +05:00
Corrections for bug IPAL12999.
This commit is contained in:
parent
68748ac514
commit
8ca4c231a8
@ -272,7 +272,10 @@ bool GEOM_Object::IsMainShape()
|
||||
Handle(GEOM_Function) GEOM_Object::AddFunction(const Standard_GUID& theGUID, int theFunctionType)
|
||||
{
|
||||
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++;
|
||||
TDF_Label aChild = FUNCTION_LABEL(nb);
|
||||
|
||||
|
@ -788,6 +788,11 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::ChangeOrientation (Handle(GEOM_
|
||||
if (theObject.IsNull())
|
||||
return NULL;
|
||||
|
||||
if (!theObject->IsMainShape()) {
|
||||
SetErrorCode("Sub shape cannot be transformed - need to create a copy");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction();
|
||||
if (aLastFunction.IsNull())
|
||||
return NULL; //There is no function which creates an object to be processed
|
||||
|
Loading…
Reference in New Issue
Block a user