refs #7663
Change-Id: I092889d83fcfd653647e4de38984304461649b3f
private G2DParentNode getOrCreateParentNode(G2DParentNode parent) {
G2DParentNode node = (G2DParentNode)parent.getNode("composite_image_"+this.hashCode());
if (node == null) {
- for (INode n : parent.getNodes())
- n.remove();
+ for (INode n : parent.getNodes()) {
+ // #7663: prevent the code from removing other element graphics from directly under another element
+ if (!(n instanceof SingleElementNode))
+ n.remove();
+ }
// Removed this grouping node as unnecessary, just use the given parent node
node = parent.getOrCreateNode("composite_image_"+this.hashCode(), G2DParentNode.class);
}