Salome HOME
INT PAL 0052660: Plot2D Viewer: Plot2d_Curve can't be selected
[modules/gui.git] / src / OCCViewer / OCCViewer_ViewModel.cxx
index c769ea891e449c2b562fbf464e2458f3ff0adbee..d7eae71b8e218e1880be08f8efc94bb9277f26d6 100755 (executable)
 #include <QDesktopWidget>
 
 #include <AIS_Axis.hxx>
-#include <AIS_Drawer.hxx>
+#if OCC_VERSION_LARGE > 0x06080000
+  #include <Prs3d_Drawer.hxx>
+#else
+  #include <AIS_Drawer.hxx>
+#endif
 #include <AIS_ListOfInteractive.hxx>
 #include <AIS_ListIteratorOfListOfInteractive.hxx>
 
@@ -121,8 +125,13 @@ OCCViewer_Viewer::OCCViewer_Viewer( bool DisplayTrihedron)
     //myTrihedron->SetColor( Col );
     myTrihedron->SetArrowColor( Col.Name() );
     myTrihedron->SetSize(100);
-    Handle(AIS_Drawer) drawer = myTrihedron->Attributes();
-    if (drawer->HasDatumAspect()) {
+#if OCC_VERSION_LARGE > 0x06080000
+      Handle(Prs3d_Drawer) drawer = myTrihedron->Attributes();
+      if (drawer->HasOwnDatumAspect()) {
+#else
+      Handle(AIS_Drawer) drawer = myTrihedron->Attributes();
+      if (drawer->HasDatumAspect()) {
+#endif
       Handle(Prs3d_DatumAspect) daspect = drawer->DatumAspect();
       daspect->FirstAxisAspect()->SetColor(Quantity_Color(1.0, 0.0, 0.0, Quantity_TOC_RGB));
       daspect->SecondAxisAspect()->SetColor(Quantity_Color(0.0, 1.0, 0.0, Quantity_TOC_RGB));