Ignore:
Timestamp:
2012-07-15T14:59:10+02:00 (12 years ago)
Author:
Don-vip
Message:

mappaint: fix "real width" painting, broken since r5212 because of a typo error on "real-width" key. Introduction of a StyleKeys interface centralizing key definitions at the same place to avoid same mistake in the future.

File:
1 edited

Legend:

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

    r4191 r5342  
    99import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
    1010import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.IconReference;
     11import org.openstreetmap.josm.gui.mappaint.StyleKeys;
    1112
    12 abstract public class Instruction {
     13abstract public class Instruction implements StyleKeys {
    1314
    1415    public abstract void execute(Environment env);
     
    3536            if (val instanceof Expression.LiteralExpression) {
    3637                Object litValue = ((Expression.LiteralExpression) val).evaluate(null);
    37                 if (key.equals("text")) {
     38                if (key.equals(TEXT)) {
    3839                    /* Special case for declaration 'text: ...'
    3940                     *
     
    7273                value = val;
    7374            }
    74             if (key.equals("icon-image") || key.equals("fill-image") || key.equals("pattern-image")) {
     75            if (key.equals(ICON_IMAGE) || key.equals(FILL_IMAGE) || key.equals("pattern-image")) {
    7576                if (value instanceof String) {
    7677                    value = new IconReference((String) value, env.source);
Note: See TracChangeset for help on using the changeset viewer.