Salome HOME
Fix for the bug #255: VTK viewer is not updated after modification of objects.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_VTKPrsDisplayer.cxx
index 94d0d405972527c74849cca6030e536cece42ea7..d4317fcd46887b389b71c6fd9b411d4635e2820e 100644 (file)
@@ -200,6 +200,12 @@ void HYDROGUI_VTKPrsDisplayer::Display( const HYDROData_SequenceOfObjects& theOb
         bool anIsInserted = ( aPrs != 0 );
         if( anIsVisible && ( !aPrs || aPrs->getIsToUpdate() || theIsForced ) )
         {
+          // Erase the presentation in the view because of the problem with GEOM_Actor upadting on second SetShape.
+          if ( aPrs )
+          {
+            aViewer->Erase( aPrs, true );
+          }
+          // Update the presentation
           if( HYDROGUI_VTKPrsDriver* aDriver = getDriver( (size_t)aViewer, anObj ) )
           {
             if( aDriver->Update( anObj, aPrs ) && aPrs && !anIsInserted )