// function : getObject
// purpose :
//=======================================================================
-GEOM::GEOM_Object_ptr GEOM_SelectionFilter::getObject (const SUIT_DataOwner* sOwner) const
+GEOM::GEOM_Object_ptr GEOM_SelectionFilter::getObject( const SUIT_DataOwner* sOwner, const bool extractReference ) const
{
GEOM::GEOM_Object_var anObj;
_PTR(Study) study = appStudy->studyDS();
QString entry = owner->entry();
- _PTR(SObject) aSO (study->FindObjectID(entry.latin1()));
+ _PTR(SObject) aSO (study->FindObjectID(entry.latin1())), aRefSO;
+ if( extractReference && aSO && aSO->ReferencedObject( aRefSO ) )
+ aSO = aRefSO;
+
if (aSO) {
std::string aValue = aSO->GetIOR();
if (strcmp(aValue.c_str(), "") != 0) {
virtual bool isOk( const SUIT_DataOwner* ) const;
protected:
- GEOM::GEOM_Object_ptr getObject( const SUIT_DataOwner* ) const;
+ GEOM::GEOM_Object_ptr getObject( const SUIT_DataOwner*, const bool = true ) const;
bool getShape( const GEOM::GEOM_Object_ptr&, TopoDS_Shape& ) const;
bool contains( const int ) const;
SalomeApp_SelectionMgr* aSelMgr = app->selectionMgr();
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
if ( aSelMgr && appStudy ) {
- aSelMgr->selectedObjects( selected );
+ aSelMgr->selectedObjects( selected, QString::null, false );
if ( !selected.IsEmpty() ) {
_PTR(Study) aStudy = appStudy->studyDS();