Salome HOME
Porting to OCCT 7.4 dev
[modules/geom.git] / src / GEOMGUI / GEOM_Displayer.cxx
index f823834d48a8d8a33c462ed3a3ea5b2efa60e80a..5a4dc49142583c62330eefa369fffe2a449d7579 100644 (file)
 #include <vtkActorCollection.h>
 #include <vtkProperty.h>
 
+#include <Basics_OCCTVersion.hxx>
 // CORBA Headers
 #include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
 
@@ -2050,8 +2051,13 @@ void GEOM_Displayer::BeforeDisplay( SALOME_View* v, const SALOME_OCCPrs* )
     Handle(AIS_InteractiveContext) ic = vf->getAISContext();
     if ( !ic.IsNull() )
     {
+#if OCC_VERSION_LARGE <= 0x07030000
       if ( ic->HasOpenedContext() )
       ic->CloseAllContexts(Standard_True);
+#else
+      ic->Deactivate();
+      ic->Activate( 0 );
+#endif
     }
   }
 }