return false;
int n = theShapes.size();
+ int anIndex = 1;
for( int i=0; i<n; i++ )
{
Handle( HYDROData_PolylineXY ) aPolyline =
return false;
aPolyline->SetShape( theShapes[i] );
- //TODO: set name
+
+ if( isUseIndices )
+ {
+ QString aNewName = theNamePrefix + "_" + QString::number( anIndex );
+ if( theDoc->FindObjectByName( aNewName ).IsNull() ) // the object with such a name is not found
+ aPolyline->SetName( aNewName );
+ anIndex++;
+ }
+ else
+ {
+ aPolyline->SetName( theNamePrefix );
+ }
}
return true;
}