Changeset 7567 in josm for trunk/src/org


Ignore:
Timestamp:
2014-09-20T14:47:48+02:00 (10 years ago)
Author:
stoecker
Message:

see #10529 - add parameter to disable outer-way styled multipolygons, defaults still to true

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java

    r7563 r7567  
    1010import java.util.Map.Entry;
    1111
     12import org.openstreetmap.josm.Main;
    1213import org.openstreetmap.josm.data.osm.Node;
    1314import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    142143     * This method does multipolygon handling.
    143144     *
    144      *
    145145     * There are different tagging styles for multipolygons, that have to be respected:
    146146     * - tags on the relation
    147      * - tags on the outer way
    148      * - tags on both, the outer and the inner way (very old style)
     147     * - tags on the outer way (deprecated)
    149148     *
    150149     * If the primitive is a way, look for multipolygon parents. In case it
     
    159158     * Now consider the case that the way is not an outer way of any multipolygon,
    160159     * but is member of a multipolygon as "inner".
    161      * First, the style list is regenerated, considering only tags of this way
    162      * minus the tags of outer way of the multipolygon (to care for the "very
    163      * old style").
     160     * First, the style list is regenerated, considering only tags of this way.
    164161     * Then check, if the way describes something in its own right. (linear feature
    165162     * or area) If not, add a default line style from the area color of the multipolygon.
     
    283280            Pair<StyleList, Range> p = generateStyles(osm, scale, true);
    284281            if (drawMultipolygon && ((Relation)osm).isMultipolygon()) {
    285                 if (!Utils.exists(p.a, AreaElemStyle.class)) {
     282                if (!Utils.exists(p.a, AreaElemStyle.class) && Main.pref.getBoolean("multipolygon.deprecated.outerstyle", true)) {
    286283                    // look at outer ways to find area style
    287284                    Multipolygon multipolygon = MultipolygonCache.getInstance().get(nc, (Relation) osm);
Note: See TracChangeset for help on using the changeset viewer.