src/main/java/chalmers/pimp/model/canvas/LayerManager.java
void removeLayer(int index) {
    if (inBounds(index)) {

      boolean removedLayerWasActive = hasActiveLayer() && (index == activeLayer.getDepthIndex());

      if (removedLayerWasActive) {
        selectNewActiveLayer(index);
      }

      ILayer removedLayer = layers.remove(index);

      resetDepthValues();

      var event = new LayerUpdateEvent(layers);
      event.setSelectionUpdated(true);
      event.setRemovedLayer(removedLayer);

      layerUpdateListeners.layersUpdated(event);
    }
  }
/**
   * Removes the layer associated with the supplied index. This method has no effect if the supplied
   * index is out-of-bounds.
   *
   * @param index the index of the layer that will be removed.
   */
Removes the layer associated with the supplied index. This method has no effect if the supplied
index is out-of-bounds.

@param index the index of the layer that will be removed.
Removes the layer associated with the supplied index . This method has no effect if the supplied index is out - of - bounds . @param index the index of the layer that will be removed .
void removeLayer(int index) {
    if (inBounds(index)) {
      boolean removedLayerWasActive = hasActiveLayer() && (index == activeLayer.getDepthIndex());
      if (removedLayerWasActive) {
        selectNewActiveLayer(index);
      }
      ILayer removedLayer = layers.remove(index);
      resetDepthValues();
      var event = new LayerUpdateEvent(layers);
      event.setSelectionUpdated(true);
      event.setRemovedLayer(removedLayer);
      layerUpdateListeners.layersUpdated(event);
    }
  }
void removeLayer ( int index ) { if ( inBounds ( index ) ) { boolean removedLayerWasActive = hasActiveLayer ( ) && ( index == activeLayer . getDepthIndex ( ) ) ; if ( removedLayerWasActive ) { selectNewActiveLayer ( index ) ; } ILayer removedLayer = layers . remove ( index ) ; resetDepthValues ( ) ; var event = new LayerUpdateEvent ( layers ) ; event . setSelectionUpdated ( true ) ; event . setRemovedLayer ( removedLayer ) ; layerUpdateListeners . layersUpdated ( event ) ; } }
Removes the layer associated with the supplied index.
Removes the layer associated with the supplied index .