Salome HOME
Feature #86: The hierarchy in the Object Browser (T 19).
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Displayer.cxx
index d42b31423cc094855c8bf18a243f2a7626bf62de..045b7db3c5e904f43d05d5d7f27497ac51058f89 100644 (file)
@@ -108,6 +108,7 @@ void HYDROGUI_Displayer::Erase( const HYDROData_SequenceOfObjects& theObjs,
       if( HYDROGUI_Prs* aPrs = HYDROGUI_Tool::GetPresentation( anObj, anObjectList ) )
       {
         aViewPort->removeItem( aPrs );
+        anObjectList.removeAll( aPrs );
         delete aPrs;
       }
     }
@@ -116,7 +117,8 @@ void HYDROGUI_Displayer::Erase( const HYDROData_SequenceOfObjects& theObjs,
 
 void HYDROGUI_Displayer::Display( const HYDROData_SequenceOfObjects& theObjs,
                                   const int theViewerId,
-                                  const bool theIsForced )
+                                  const bool theIsForced,
+                                  const bool theDoFitAll)
 {
   GraphicsView_Viewer* aViewer = module()->getViewer( theViewerId );
   if( !aViewer )
@@ -154,7 +156,10 @@ void HYDROGUI_Displayer::Display( const HYDROData_SequenceOfObjects& theObjs,
   }
 
   aViewPort->onBoundingRectChanged(); // specific of HYDRO module
-  aViewPort->fitAll();
+  if ( theDoFitAll )
+  {
+    aViewPort->fitAll();
+  }
 }
 
 void HYDROGUI_Displayer::purgeObjects( const int theViewerId )
@@ -212,3 +217,8 @@ HYDROGUI_PrsDriver* HYDROGUI_Displayer::getDriver( const Handle(HYDROData_Entity
 
   return aDriver;
 }
+
+QString HYDROGUI_Displayer::GetType() const
+{
+  return GraphicsView_Viewer::Type();
+}