Clone Markups Node Issue

Hello,

I need to clone line, curve, and closed curve nodes. When I use the method in the script repository it creates a trace of the original node. Does anyone have a fix or better method? I am using Python.

The leftmost blue line is the original node and the rightmost red line is the clone node (which I have moved to show the trace). I want only the line connecting the two points.

Thanks!

I cannot reproduce this issue with latest Slicer Preview Release. I created a markups line node and ran this script:

nodeToClone = getNode('L')
shNode = slicer.vtkMRMLSubjectHierarchyNode.GetSubjectHierarchyNode(slicer.mrmlScene)
itemIDToClone = shNode.GetItemByDataNode(nodeToClone)
clonedItemID = slicer.modules.subjecthierarchy.logic().CloneSubjectHierarchyItem(shNode, itemIDToClone)
clonedNode = shNode.GetItemDataNode(clonedItemID)