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

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