Salome HOME
Dump to python corrected.
[modules/hydro.git] / src / HYDROData / HYDROData_PolylineXY.cxx
index f9137e66d6fd0d1520c5821efc922e86800c4160..cdbc3752ed80be47369e61c458b30f9c741dcac5 100755 (executable)
@@ -107,7 +107,19 @@ HYDROData_PolylineXY::~HYDROData_PolylineXY()
 QStringList HYDROData_PolylineXY::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
   QStringList aResList = dumpObjectCreation( theTreatedObjects );
-  QString aPolylineName = GetName();
+  QString aPolylineName = GetObjPyName();
+
+  // Set the wire color
+  QStringList aWireColorDef;
+
+  QColor aWireColor = GetWireColor();
+  setPythonObjectColor( aWireColorDef, aWireColor, DefaultWireColor(), "SetWireColor" );
+  
+  if ( !aWireColorDef.isEmpty() )
+  {
+    aResList << aWireColorDef;
+    aResList << QString( "" );
+  }
 
   // Set polilyne data
   NCollection_Sequence<TCollection_AsciiString>           aSectNames;
@@ -129,7 +141,7 @@ QStringList HYDROData_PolylineXY::DumpToPython( MapOfTreatedObjects& theTreatedO
     {
       const Point& aSectPoint = aSectPointsList.Value( k );
 
-      aResList << QString( "%1.AddPoint( %2, QPointF( %3, %4 ) );" ).arg( aPolylineName )
+      aResList << QString( "%1.AddPoint( %2, gp_XY( %3, %4 ) );" ).arg( aPolylineName )
         .arg( i - 1 ).arg( aSectPoint.X() ).arg( aSectPoint.Y() );
     }
   }