Salome HOME
Updated copyright comment
[modules/hexablock.git] / src / HEXABLOCKGUI / HEXABLOCKGUI_OccGraphicView.cxx
old mode 100755 (executable)
new mode 100644 (file)
index c049810..2c33135
@@ -1,4 +1,4 @@
-// Copyright (C) 2009-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2009-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 //
 
 
-
 #include "HEXABLOCKGUI_OccGraphicView.hxx"
 #include "HEXABLOCKGUI.hxx"
 #include "HEXABLOCKGUI_VtkDocumentGraphicView.hxx"
 
+#include <Basics_OCCTVersion.hxx>
+
 #include <SOCC_ViewModel.h>
 #include <SUIT_ViewManager.h>
 
@@ -42,7 +43,7 @@ OccGraphicView::OccGraphicView( OCCViewer_ViewWindow* view, QWidget* parent ):
     TopoDS_Shape shapeToPreview;
     previewShape = new AIS_Shape(shapeToPreview);
 //    previewShape->SetColor(Quantity_NOC_RED);
-    getContext()->SetColor( previewShape, Quantity_NOC_RED );
+    getContext()->SetColor( previewShape, Quantity_NOC_RED, Standard_True );
 }
 
 void OccGraphicView::setSelectionMode(TopAbs_ShapeEnum mode)
@@ -203,7 +204,11 @@ void OccGraphicView::highlightSubShapes(const Handle(AIS_Shape)& anObj,
 
     //get the context
     Handle (AIS_InteractiveContext) anIC = getContext();
-    if ( anIC.IsNull() || !anIC->HasOpenedContext() )
+    if ( anIC.IsNull() 
+#if OCC_VERSION_LARGE <= 0x07030000
+        || !anIC->HasOpenedContext() 
+#endif
+        )
         return;
 
     // ** highlight
@@ -318,7 +323,7 @@ void OccGraphicView::displayPreview(TopoDS_Shape& shape)
 
     previewShape->Set(shape);
 //    previewShape->SetColor(Quantity_NOC_RED);
-    getContext()->SetColor( previewShape, Quantity_NOC_RED );
+    getContext()->SetColor( previewShape, Quantity_NOC_RED, Standard_True );
     previewShape->Redisplay();
     vf->Repaint();
 }