_PTR(SObject) theSource,
VISU::Result_var& theResult)
{
+ if(theSource->Depth() < 3) // Bug of SALOMEDS : can\t get father from root object
+ return NULL;
+
_PTR(SObject) aSObj = theSource->GetFather();
if (!aSObj)
return NULL;
return NULL;
theResult = VISU::Result::_narrow(anObject);
- VISU::Result_i* pResult = dynamic_cast<VISU::Result_i*>(VISU::GetServant(anObject).in());
- if (pResult == NULL)
- SUIT_MessageBox::warn1(GetDesktop(theModule),
- QObject::tr("WRN_VISU"),
- QObject::tr("WRN_NO_AVAILABLE_DATA"),
- QObject::tr("BUT_OK"));
- return pResult;
+ return dynamic_cast<VISU::Result_i*>(VISU::GetServant(anObject).in());
}
//************************************************************