GraphicsObjects compare equal by shape and position, but clients will expect group.remove(object) to remove the specific object they name, name just any GraphicsObject that compares equal.
Steps to Reproduce
GraphicsGroup group = new GraphicsGroup();
Rectangle r1 = new Rectangle(0, 0, 1, 1);
Rectangle r2 = new Rectangle(0, 0, 1, 1);
Rectangle r3 = new Rectangle(0, 0, 1, 1);
group.add(r1);
group.add(r2);
group.add(r3);
group.remove(r2);
Description
GraphicsObjects compare equal by shape and position, but clients will expect
group.remove(object)
to remove the specific object they name, name just any GraphicsObject that compares equal.Steps to Reproduce
Expected behavior
Group should contain [r2, r3].
Actual behavior
Group contains [r1, r3].
Reported by @andrewbethke.