Changeset 10927 in josm for trunk


Ignore:
Timestamp:
2016-09-01T20:00:55+02:00 (3 years ago)
Author:
simon04
Message:

see #13217 - Only one location for deprecated icon names

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/TagInfoExtract.groovy

    r10876 r10927  
    128128            def image = c.get("icon-image")
    129129            if (image) {
    130                 if (image instanceof IconReference) {
    131                     if (image.iconName != "misc/deprecated.svg")
    132                         return find_image_url(image.iconName)
     130                if (image instanceof IconReference && !image.isDeprecatedIcon()) {
     131                    return find_image_url(image.iconName)
    133132                }
    134133            }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java

    r10926 r10927  
    111111        public String toString() {
    112112            return "IconReference{" + "iconName='" + iconName + "' source='" + source.getDisplayString() + "'}";
     113        }
     114
     115        /**
     116         * Determines whether this icon represents a deprecated icon
     117         * @return whether this icon represents a deprecated icon
     118         * @since 10927
     119         */
     120        public boolean isDeprecatedIcon() {
     121            return DEPRECATED_IMAGE_NAMES.contains(iconName);
    113122        }
    114123    }
Note: See TracChangeset for help on using the changeset viewer.