From: mnt Date: Mon, 10 Oct 2016 13:06:44 +0000 (+0300) Subject: RNV: fix compilation on dev version of OCCT. X-Git-Tag: V8_2_0a1~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=93e1d7267f343778465890f0ae825152ae249e9b;p=modules%2Fgui.git RNV: fix compilation on dev version of OCCT. --- diff --git a/src/OCCViewer/OCCViewer_AISSelector.cxx b/src/OCCViewer/OCCViewer_AISSelector.cxx index 03d62e826..25a354fc3 100755 --- a/src/OCCViewer/OCCViewer_AISSelector.cxx +++ b/src/OCCViewer/OCCViewer_AISSelector.cxx @@ -22,6 +22,8 @@ #include "OCCViewer_AISSelector.h" +#include + /*! Constructor */ @@ -70,7 +72,11 @@ void OCCViewer_AISSelector::setHilightColor ( Quantity_NameOfColor color ) { myHilightColor = color; if ( !myAISContext.IsNull() ) - myAISContext->SetHilightColor( myHilightColor ); +#if OCC_VERSION_LARGE > 0x07000000 + myAISContext->ChangeHighlightStyle()->SetColor( myHilightColor ); +#else + myAISContext->SetHilightColor( myHilightColor ); +#endif } /*! @@ -80,7 +86,11 @@ void OCCViewer_AISSelector::setSelectColor ( Quantity_NameOfColor color ) { mySelectColor = color; if ( !myAISContext.IsNull() ) +#if OCC_VERSION_LARGE > 0x07000000 + myAISContext->ChangeSelectionStyle()->SetColor( mySelectColor ); +#else myAISContext->SelectionColor( mySelectColor ); +#endif } /*! @@ -90,8 +100,13 @@ void OCCViewer_AISSelector::setAISContext ( const Handle (AIS_InteractiveContext { myAISContext = aisContext; if ( ! myAISContext.IsNull() ) { +#if OCC_VERSION_LARGE > 0x07000000 + myAISContext->ChangeHighlightStyle()->SetColor( myHilightColor ); + myAISContext->ChangeSelectionStyle()->SetColor( mySelectColor ); +#else myAISContext->SetHilightColor( myHilightColor ); myAISContext->SelectionColor( mySelectColor ); +#endif myAISContext->SetSubIntensityColor( Quantity_NOC_CYAN1 ); } } diff --git a/src/OCCViewer/OCCViewer_ViewModel.cxx b/src/OCCViewer/OCCViewer_ViewModel.cxx index 2aee70481..53f62f987 100644 --- a/src/OCCViewer/OCCViewer_ViewModel.cxx +++ b/src/OCCViewer/OCCViewer_ViewModel.cxx @@ -129,7 +129,11 @@ OCCViewer_Viewer::OCCViewer_Viewer( bool DisplayTrihedron) // init selector myAISContext = new AIS_InteractiveContext( myV3dViewer ); +#if OCC_VERSION_LARGE > 0x07000000 + myAISContext->ChangeSelectionStyle()->SetColor( Quantity_NOC_WHITE ); +#else myAISContext->SelectionColor( Quantity_NOC_WHITE ); +#endif // display isoline on planar faces (box for ex.) myAISContext->IsoOnPlane( true );