models.removeIf(g -> Objects.equals(g.getLayer().getType(), type));
layers.removeIf(l -> Objects.equals(l.getType(), type));
}
}
@Override
<BUG>public void deleteNonSerializableGraphics() {
synchronized (models) {</BUG>
for (Graphic g : models) {
if (!g.getLayer().getType().getSerializable()) {
g.removeAllPropertyChangeListener();

models.removeIf(g -> Objects.equals(g.getLayer().getType(), type));
layers.removeIf(l -> Objects.equals(l.getType(), type));
}
}
@Override
public void deleteNonSerializableGraphics() {
if (models.isEmpty()) {
return;
}
synchronized (models) {
for (Graphic g : models) {
if (!g.getLayer().getType().getSerializable()) {
g.removeAllPropertyChangeListener();
