]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
PAL10332 - references are interpreted as original objects in filters, dialogs, etc.
authorasl <asl@opencascade.com>
Tue, 25 Oct 2005 08:17:50 +0000 (08:17 +0000)
committerasl <asl@opencascade.com>
Tue, 25 Oct 2005 08:17:50 +0000 (08:17 +0000)
src/GEOMFiltersSelection/GEOM_SelectionFilter.cxx
src/GEOMFiltersSelection/GEOM_SelectionFilter.h
src/GEOMToolsGUI/GEOMToolsGUI.cxx

index b880fd3b497305d42a23aeea294c4f5b4bc38744..33e3a9482c2f0d451c08990cbebcd4b3f3f67ecd 100644 (file)
@@ -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) {
index a4a1154323e63708e378ac66112f4e81349b1c13..d08ca1b1680563f1309a4333b991b26cb9521b4d 100644 (file)
@@ -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;
index b9969940765b8735b244d554dde9a2db15d4dd1a..84733dc543c7842a6641216ed94ae9e60133922c 100644 (file)
@@ -232,7 +232,7 @@ void GEOMToolsGUI::OnEditDelete()
     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();