Salome HOME
Fix for the bug #45: check and warning when the same image is used in 2 arguments.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Displayer.cxx
index 570ba30cf0fc184869308102cb7fd33951ebbdd0..548f5e47953bf70b5ac697f2499f2718aaa39bec 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;
       }
     }
@@ -200,7 +201,7 @@ HYDROGUI_PrsDriver* HYDROGUI_Displayer::getDriver( const Handle(HYDROData_Entity
       case KIND_IMAGE:
         aDriver = new HYDROGUI_PrsImageDriver();
         break;
-      case KIND_POLYLINE:
+      case KIND_POLYLINEXY:
         aDriver = new HYDROGUI_PrsPolylineDriver();
         break;
       case KIND_ZONE: