}
QString aName = theName;
if( aName.isEmpty() )
- aName = "merged";
+ {
+ aName = "merged";
+ int anIndex = 1;
+ QString aNewName = aName + "_" + QString::number(anIndex);
+ while (!theDoc->FindObjectByName(aNewName).IsNull()) // the object with such a name is not found
+ {
+ anIndex++;
+ aNewName = aName + "_" + QString::number(anIndex);
+ }
+ aName = aNewName;
+ }
+
aNewPolyline->SetName(aName);
+ aNewPolyline->Update();
return true;
}
}
CreatePolylines( theDoc, thePolyline, aResult, true );
- //CreatePolylinesSplit( theDoc, thePolyline, aResult, true );
return true;
}
return false;
aPolyline->ImportShape(theShapes[i], false, theOldPolyline, false);
- //aPolyline->SetShape( theShapes[i] );
-
if( isUseIndices )
{