]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Porting to OCCT 7.1
authorvsr <vsr@opencascade.com>
Tue, 24 Jan 2017 12:57:44 +0000 (15:57 +0300)
committervsr <vsr@opencascade.com>
Tue, 24 Jan 2017 13:33:58 +0000 (16:33 +0300)
src/HYDROGUI/HYDROGUI_ZLayers2.cxx

index af9391c7e8c5afcc1d014cba9e16c70e636c6448..c3f547667a4c0d3fe40068d51426e40c427e08fa 100644 (file)
@@ -23,6 +23,7 @@
 #include <AIS_ListIteratorOfListOfInteractive.hxx>
 #include <AIS_Trihedron.hxx>
 #include <PrsMgr_PresentationManager3d.hxx>
+#include <Basics_OCCTVersion.hxx>
 
 void UpdateZLayersOfHilightPresentationsOfDisplayedObjects( const Handle(AIS_InteractiveContext)& theContext,
                                                             int theLayer )
@@ -37,7 +38,12 @@ void UpdateZLayersOfHilightPresentationsOfDisplayedObjects( const Handle(AIS_Int
     if( !aPrsObj.IsNull() && !aPrsObj->IsKind( STANDARD_TYPE(AIS_Trihedron) ) )
     {
       int aMode = aPrsObj->HasHilightMode() ? aPrsObj->HilightMode() : 0;
-      theContext->MainPrsMgr()->Color( aPrsObj, Quantity_NOC_YELLOW, aMode );
+#if OCC_VERSION_LARGE < 0x07010000
+      Quantity_NameOfColor aStyle = Quantity_NOC_YELLOW;
+#else
+      Handle(Graphic3d_HighlightStyle) aStyle = new Graphic3d_HighlightStyle( Aspect_TOHM_COLOR, Quantity_NOC_YELLOW );
+#endif
+      theContext->MainPrsMgr()->Color( aPrsObj, aStyle, aMode );
       SetPrsZLayer( aPrsObj, aMode, theLayer );
       theContext->MainPrsMgr()->Unhighlight( aPrsObj, aMode );
     }