Ignore:
Timestamp:
2016-03-18T00:56:54+01:00 (8 years ago)
Author:
Don-vip
Message:

fix #12633 - Make layer order more flexible by letting each layer decide where it wants to be placed (patch by michael2402)

File:
1 edited

Legend:

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

    r9978 r10008  
    581581        return 0;
    582582    }
     583
     584    /**
     585     * Gets the strategy that specifies where this layer should be inserted in a layer list.
     586     * @return That strategy.
     587     * @since 10008
     588     */
     589    public LayerPositionStrategy getDefaultLayerPosition() {
     590        if (isBackgroundLayer()) {
     591            return LayerPositionStrategy.BEFORE_FIRST_BACKGROUND_LAYER;
     592        } else {
     593            return LayerPositionStrategy.AFTER_LAST_VALIDATION_LAYER;
     594        }
     595    }
    583596}
Note: See TracChangeset for help on using the changeset viewer.