Salome HOME
- Bathymethries are colored now by all colors (including red etc.)
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_OCCDisplayer.cxx
index 61a78ac4c5f580df2af36282b7284e01303c2a61..602cb5cb5cd00ab7a2a967c84f0de611fde56c30 100644 (file)
@@ -104,7 +104,8 @@ HYDROGUI_Shape* HYDROGUI_OCCDisplayer::createShape( const int
        anObjectKind != KIND_POLYLINE &&
        anObjectKind != KIND_IMMERSIBLE_ZONE &&
        anObjectKind != KIND_REGION &&
-       anObjectKind != KIND_ZONE )
+       anObjectKind != KIND_ZONE &&
+       anObjectKind != KIND_OBSTACLE  )
     return aResShape;
 
   aResShape = new HYDROGUI_Shape( theContext, theObject );
@@ -115,7 +116,8 @@ HYDROGUI_Shape* HYDROGUI_OCCDisplayer::createShape( const int
 
 void HYDROGUI_OCCDisplayer::Display( const HYDROData_SequenceOfObjects& theObjs,
                                      const int                          theViewerId,
-                                     const bool                         theIsForced )
+                                     const bool                         theIsForced,
+                                     const bool theDoFitAll )
 {
   OCCViewer_Viewer* aViewer = module()->getOCCViewer( theViewerId );
   if( !aViewer )
@@ -149,15 +151,18 @@ void HYDROGUI_OCCDisplayer::Display( const HYDROData_SequenceOfObjects& theObjs,
     }
   }
 
-  OCCViewer_ViewManager* aViewManager
-    = ::qobject_cast<OCCViewer_ViewManager*>( aViewer->getViewManager() );
-  if ( aViewManager )
+  if ( theDoFitAll )
   {
-    OCCViewer_ViewWindow* aViewWindow = 
-      ::qobject_cast<OCCViewer_ViewWindow*>( aViewManager->getActiveView() );
-    if ( aViewWindow )
+    OCCViewer_ViewManager* aViewManager
+      = ::qobject_cast<OCCViewer_ViewManager*>( aViewer->getViewManager() );
+    if ( aViewManager )
     {
-      aViewWindow->onFitAll();
+      OCCViewer_ViewWindow* aViewWindow = 
+        ::qobject_cast<OCCViewer_ViewWindow*>( aViewManager->getActiveView() );
+      if ( aViewWindow )
+      {
+        aViewWindow->onFitAll();
+      }
     }
   }
 }
@@ -189,4 +194,7 @@ void HYDROGUI_OCCDisplayer::purgeObjects( const int theViewerId )
   }
 }
 
-
+QString HYDROGUI_OCCDisplayer::GetType() const
+{
+  return OCCViewer_Viewer::Type();
+}