From 93e1d7267f343778465890f0ae825152ae249e9b Mon Sep 17 00:00:00 2001 From: mnt Date: Mon, 10 Oct 2016 16:06:44 +0300 Subject: [PATCH] RNV: fix compilation on dev version of OCCT. --- src/OCCViewer/OCCViewer_AISSelector.cxx | 17 ++++++++++++++++- src/OCCViewer/OCCViewer_ViewModel.cxx | 4 ++++ 2 files changed, 20 insertions(+), 1 deletion(-) 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 ); -- 2.39.2