void OCCViewer_AISSelector::setHilightColor ( Quantity_NameOfColor color )
{
myHilightColor = color;
- if ( !myAISContext.IsNull() )
+ if ( !myAISContext.IsNull() ) {
#if OCC_VERSION_LARGE > 0x07000000
- myAISContext->ChangeHighlightStyle()->SetColor( myHilightColor );
+ const Handle(Graphic3d_HighlightStyle)& hStyle = myAISContext->HighlightStyle();
+ hStyle->SetColor( myHilightColor );
#else
myAISContext->SetHilightColor( myHilightColor );
#endif
+ }
}
/*!
void OCCViewer_AISSelector::setSelectColor ( Quantity_NameOfColor color )
{
mySelectColor = color;
- if ( !myAISContext.IsNull() )
+ if ( !myAISContext.IsNull() ) {
#if OCC_VERSION_LARGE > 0x07000000
- myAISContext->ChangeSelectionStyle()->SetColor( mySelectColor );
+ const Handle(Graphic3d_HighlightStyle)& sStyle = myAISContext->SelectionStyle();
+ sStyle->SetColor( mySelectColor );
#else
myAISContext->SelectionColor( mySelectColor );
-#endif
+#endif
+ }
}
/*!
myAISContext = aisContext;
if ( ! myAISContext.IsNull() ) {
#if OCC_VERSION_LARGE > 0x07000000
- myAISContext->ChangeHighlightStyle()->SetColor( myHilightColor );
- myAISContext->ChangeSelectionStyle()->SetColor( mySelectColor );
+ const Handle(Graphic3d_HighlightStyle)& hStyle = myAISContext->HighlightStyle();
+ const Handle(Graphic3d_HighlightStyle)& sStyle = myAISContext->SelectionStyle();
+ hStyle->SetColor( myHilightColor );
+ sStyle->SetColor( mySelectColor );
#else
myAISContext->SetHilightColor( myHilightColor );
myAISContext->SelectionColor( mySelectColor );
// init selector
myAISContext = new AIS_InteractiveContext( myV3dViewer );
#if OCC_VERSION_LARGE > 0x07000000
- myAISContext->ChangeSelectionStyle()->SetColor( Quantity_NOC_WHITE );
+
+ const Handle(Graphic3d_HighlightStyle)& sStyle = myAISContext->SelectionStyle();
+ sStyle->SetColor( Quantity_NOC_WHITE );
#else
myAISContext->SelectionColor( Quantity_NOC_WHITE );
#endif