Salome HOME
Coloring of objects (Bug #219).
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_PolylineOp.cxx
index 889a13362e7eae9e44834a5c49302c1c91246ca1..835b9d04d18f341507a19b3c81f089a00abfc57e 100755 (executable)
@@ -250,6 +250,11 @@ bool HYDROGUI_PolylineOp::processApply( int& theUpdateFlags,
     }
   }
 
+  if ( !myIsEdit )
+  {
+    aPolylineObj->SetWireColor( HYDROData_PolylineXY::DefaultWireColor() );
+  }
+
   // Update the wire of polyline
   aPolylineObj->Update();
 
@@ -327,4 +332,11 @@ void HYDROGUI_PolylineOp::erasePreview()
       }
     }
   }
+
+  myViewManager = NULL;
+  if ( myCurve )
+  {
+    delete myCurve;
+    myCurve = NULL;
+  }
 }