Icy-imaging/Icy-Kernel — Issue #204: ROI Copy name
Author: Fab14
Created: 2011-10-20 14:32:21+00:00
State: open

When an ROI is copied, the original name of the source roi is altered:

int the ROI class:

public ROI getCopy()
{
// use XML persistence for cloning
final Node node = XMLUtil.createDocument(true).getDocumentElement();

saveToXML(node);
final ROI result = createFromXML(node);

// then generate id and modify name
id = generateId();
// change name too
setName(name + " copy");

return result;
}

should be:

public ROI getCopy()
{
// use XML persistence for cloning
final Node node = XMLUtil.createDocument(true).getDocumentElement();

saveToXML(node);
final ROI result = createFromXML(node);

// then generate id and modify name
id = generateId();
// change name too

// HERE// HERE// HERE
result.setName(name + " copy");

return result;
}