Changeset 10998 in josm for trunk


Ignore:
Timestamp:
2016-09-13T15:07:08+02:00 (3 years ago)
Author:
michael2402
Message:

Make layer remove event fire after the layer has been removed. This fixes #13485. Fixes #13516.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/LayerManager.java

    r10997 r10998  
    3535         * Notifies this listener that a layer has been added.
    3636         * <p>
    37          * Listeners are called in the EDT thread and you can manipulate the layer manager in the current thread.
     37         * Listeners are called in the EDT thread.
    3838         * @param e The new added layer event
    3939         */
     
    4141
    4242        /**
    43          * Notifies this listener that a layer is about to be removed.
     43         * Notifies this listener that a alayer was just removed.
    4444         * <p>
    45          * Listeners are called in the EDT thread and you can manipulate the layer manager in the current thread.
     45         * Listeners are called in the EDT thread after the layer was removed.
     46         * Use {@link LayerRemoveEvent#scheduleRemoval(Collection)} to remove more layers.
    4647         * @param e The layer to be removed (as event)
    4748         */
     
    223224
    224225    protected Collection<Layer> realRemoveSingleLayer(Layer layerToRemove) {
    225         Collection<Layer> newToRemove = fireLayerRemoving(layerToRemove);
    226226        layers.remove(layerToRemove);
    227         return newToRemove;
     227        return fireLayerRemoving(layerToRemove);
    228228    }
    229229
     
    386386    /**
    387387     * Fire the layer remove event
    388      * @param layer The layer to remove
     388     * @param layer The layer that was removed
    389389     * @return A list of layers that should be removed afterwards.
    390390     */
Note: See TracChangeset for help on using the changeset viewer.