Bug in OCC 5.2. Missing braces in FindSelectedOwnerFromShape function!

I've tested with FindSelectedOwnerFromShape function from AIS_LocalContext, and it did works correctly (missed {} after if(EO->Shape() == sh) statement).

Here is origin code:
...
...
if(!Tr.IsNull()){

EO = *((Handle(SelectMgr_EntityOwner)*)&Tr);
if(EO->HasShape())
if ( EO->Shape() == sh)
found =Standard_True;
break;
}

And here is modified code (works correctly).

...
...
if(!Tr.IsNull()){

EO = *((Handle(SelectMgr_EntityOwner)*)&Tr);
if(EO->HasShape())
if ( EO->Shape() == sh)
{//missing
found =Standard_True;
break;
}//missing
}

Ngoc Truong Nguyen - DASI Center

Forum supervisor's picture

Dear Sir,

Thank you very much for this contribution !
I am glad to inform you that your modification has been registered as an improvement request with reference number OCC9026 in our bug tracking system. We shall test your solution and, in case of positive results, we shall integrate this improvement in future versions of Open CASCADE Technology.

To check if this improvement is integrated in a release, please refer to the Release Notes at http://www.opencascade.org/getocc/whatsnew/.

Thank you, and best regards !
Forum Supervisor