From: asl Date: Tue, 25 Oct 2005 08:17:50 +0000 (+0000) Subject: PAL10332 - references are interpreted as original objects in filters, dialogs, etc. X-Git-Tag: V3_1_0a3~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=49cd48980d951e4c60695536db6bb08dd30e4e7d;p=modules%2Fgeom.git PAL10332 - references are interpreted as original objects in filters, dialogs, etc. --- diff --git a/src/GEOMFiltersSelection/GEOM_SelectionFilter.cxx b/src/GEOMFiltersSelection/GEOM_SelectionFilter.cxx index b880fd3b4..33e3a9482 100644 --- a/src/GEOMFiltersSelection/GEOM_SelectionFilter.cxx +++ b/src/GEOMFiltersSelection/GEOM_SelectionFilter.cxx @@ -54,7 +54,7 @@ bool GEOM_SelectionFilter::isOk( const SUIT_DataOwner* sOwner ) const // 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; @@ -65,7 +65,10 @@ GEOM::GEOM_Object_ptr GEOM_SelectionFilter::getObject (const SUIT_DataOwner* sOw _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) { diff --git a/src/GEOMFiltersSelection/GEOM_SelectionFilter.h b/src/GEOMFiltersSelection/GEOM_SelectionFilter.h index a4a115432..d08ca1b16 100644 --- a/src/GEOMFiltersSelection/GEOM_SelectionFilter.h +++ b/src/GEOMFiltersSelection/GEOM_SelectionFilter.h @@ -20,7 +20,7 @@ public: 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; diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index b99699407..84733dc54 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -232,7 +232,7 @@ void GEOMToolsGUI::OnEditDelete() SalomeApp_SelectionMgr* aSelMgr = app->selectionMgr(); SalomeApp_Study* appStudy = dynamic_cast( app->activeStudy() ); if ( aSelMgr && appStudy ) { - aSelMgr->selectedObjects( selected ); + aSelMgr->selectedObjects( selected, QString::null, false ); if ( !selected.IsEmpty() ) { _PTR(Study) aStudy = appStudy->studyDS();