src/main/java/chalmers/pimp/model/canvas/LayerManager.java
void addLayer(ILayer layer) {
    ILayer match = findMatch(layer);
    if (match == null) {
      layers.add(layer);

      resetDepthValues();

      activeLayer = layer;

      var event = new LayerUpdateEvent(layers);
      event.setAddedLayer(layer);
      event.setSelectionUpdated(true);

      layerUpdateListeners.layersUpdated(event);
    }
  }
/**
   * Adds a layer to the manager and makes it the active layer. This method has no effect if the
   * supplied layer is already contained within the manager. The supplied layer will be made the
   * active layer if it is the only present layer in the manager.
   *
   * @param layer the layer that will be added, may not be {@code null}.
   * @throws NullPointerException if the supplied layer is {@code null}.
   */
Adds a layer to the manager and makes it the active layer. This method has no effect if the
supplied layer is already contained within the manager. The supplied layer will be made the
active layer if it is the only present layer in the manager.

@param layer the layer that will be added, may not be  null.
@throws NullPointerException if the supplied layer is  null.
Adds a layer to the manager and makes it the active layer . This method has no effect if the supplied layer is already contained within the manager . The supplied layer will be made the active layer if it is the only present layer in the manager . @param layer the layer that will be added may not be null . @throws NullPointerException if the supplied layer is null .
void addLayer(ILayer layer) {
    ILayer match = findMatch(layer);
    if (match == null) {
      layers.add(layer);
      resetDepthValues();
      activeLayer = layer;
      var event = new LayerUpdateEvent(layers);
      event.setAddedLayer(layer);
      event.setSelectionUpdated(true);
      layerUpdateListeners.layersUpdated(event);
    }
  }
void addLayer ( ILayer layer ) { ILayer match = findMatch ( layer ) ; if ( match == null ) { layers . add ( layer ) ; resetDepthValues ( ) ; activeLayer = layer ; var event = new LayerUpdateEvent ( layers ) ; event . setAddedLayer ( layer ) ; event . setSelectionUpdated ( true ) ; layerUpdateListeners . layersUpdated ( event ) ; } }
Adds a layer to the manager and makes it the active layer.
Adds a layer to the manager and makes it the active layer .