Salome HOME
Merge branch 'fbt/add_header_for_mpi_compilation'
[modules/geom.git] / src / GEOMGUI / GEOM_Displayer.cxx
index edf74e3841733a866babc0b79b9708e7a6982efe..02ed62e653860ee90ca8457bd4714462540ef5f8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -68,6 +68,7 @@
 
 #include <SALOME_ListIO.hxx>
 #include <SALOME_Prs.h>
+#include "utilities.h"
 
 #include <SOCC_Prs.h>
 #include <SOCC_ViewModel.h>
@@ -1835,7 +1836,7 @@ void GEOM_Displayer::internalReset()
  *  of their sub-shapes (with opened local context for OCC viewer)
  */
 //=================================================================
-void GEOM_Displayer::LocalSelection( const Handle(SALOME_InteractiveObject)& theIO, const int theMode )
+void GEOM_Displayer::LocalSelection( const Handle(SALOME_InteractiveObject)& theIO, const std::list<int> modes )
 {
   SUIT_Session* session = SUIT_Session::session();
   SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( session->activeApplication() );
@@ -1852,11 +1853,25 @@ void GEOM_Displayer::LocalSelection( const Handle(SALOME_InteractiveObject)& the
     if (!theIO.IsNull() && !vf->isVisible(theIO))
       Display(theIO);
     SALOME_Prs* prs = vf->CreatePrs( theIO.IsNull() ? 0 : theIO->getEntry() );
-    vf->LocalSelection( prs, theMode );
+    vf->LocalSelection( prs, modes );
     delete prs;  // delete presentation because displayer is its owner
   }
 }
 
+//=================================================================
+/*!
+ *  GEOM_Displayer::LocalSelection
+ *  Activate selection of CAD shapes with activisation of selection
+ *  of their sub-shapes (with opened local context for OCC viewer)
+ */
+//=================================================================
+void GEOM_Displayer::LocalSelection( const Handle(SALOME_InteractiveObject)& theIO, const int theMode )
+{
+  std::list<int> modes;
+  modes.push_back( theMode );
+  LocalSelection( theIO, modes );
+}
+
 //=================================================================
 /*!
  *  GEOM_Displayer::globalSelection
@@ -1970,11 +1985,25 @@ void GEOM_Displayer::GlobalSelection( const TColStd_MapOfInteger& theModes,
  *  of their sub-shapes (with opened local context for OCC viewer)
  */
 //=================================================================
-void GEOM_Displayer::LocalSelection( const SALOME_ListIO& theIOList, const int theMode )
+void GEOM_Displayer::LocalSelection( const SALOME_ListIO& theIOList, const std::list<int> modes )
 {
   SALOME_ListIteratorOfListIO Iter( theIOList );
   for ( ; Iter.More(); Iter.Next() )
-    LocalSelection( Iter.Value(), theMode );
+    LocalSelection( Iter.Value(), modes );
+}
+
+//=================================================================
+/*!
+ *  GEOM_Displayer::LocalSelection
+ *  Activate selection of CAD shapes with activisation of selection
+ *  of their sub-shapes (with opened local context for OCC viewer)
+ */
+//=================================================================
+void GEOM_Displayer::LocalSelection( const SALOME_ListIO& theIOList, const int theMode )
+{
+  std::list<int> modes;
+  modes.push_back( theMode );
+  LocalSelection( theIOList, modes );
 }
 
 //=================================================================