{
if (CheckLock(GetCStudy(GetAppStudy(theModule))))
return NULL;
-
+
CORBA::Object_var anObject = GetSelectedObj(theModule, theIO);
- if (CORBA::is_nil(anObject))
+ if (CORBA::is_nil(anObject))
return NULL;
PortableServer::ServantBase_var aServant = VISU::GetServant(anObject);
- if (!aServant.in())
+ if (!aServant.in())
return NULL;
-
+
return dynamic_cast<VISU::Prs3d_i*>(aServant.in());
}
}
} else {
// Remove aSObject together with all its sub-objects
-
+
VISU::RemoveFromStudy(theSObject,
false, // remove not only IOR attribute, but Object With Children
false); // not Destroy() sub-objects
Handle(SALOME_InteractiveObject) anIO;
CORBA::Object_var anObject = GetSelectedObj(theModule, &anIO);
if (CORBA::is_nil(anObject)) return;
+
+ VISU::Base_var aVisuObj = VISU::Base::_narrow(anObject);
+ if (CORBA::is_nil(aVisuObj)) return;
+
PortableServer::ServantBase_var aServant = VISU::GetServant(anObject);
if (!aServant.in()) return;