Changeset 3899 in josm


Ignore:
Timestamp:
2011-02-13T20:26:58+01:00 (12 years ago)
Author:
bastiK
Message:

mapcss: small fix

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPainter.java

    r3896 r3899  
    248248        if (text == null)
    249249            return;
    250         String name = getAreaName(way);
     250        String name = text.getString(way, this);
    251251        if (name == null || name.equals(""))
    252252            return;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java

    r3888 r3899  
    4747                RelativeFloat width_rel = c.get(key, null, RelativeFloat.class, true);
    4848                if (width_rel != null)
    49                     return relativeTo + 2*width_rel.val;
     49                    return relativeTo + width_rel.val;
    5050            }
    5151        }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/TextElement.java

    r3888 r3899  
    66import java.awt.Color;
    77import java.awt.Font;
     8import org.openstreetmap.josm.data.osm.OsmPrimitive;
     9import org.openstreetmap.josm.data.osm.visitor.paint.MapPainter;
    810
    911import org.openstreetmap.josm.tools.CheckParameterUtil;
     
    8082    }
    8183
     84    public String getString(OsmPrimitive osm, MapPainter painter) {
     85        if (textKey == null)
     86            return painter.getAreaName(osm);
     87        else
     88            return osm.get(textKey);
     89    }
     90
     91
    8292}
  • trunk/styles_nodist/potlatch2/build.xml

    • Property svn:eol-style set to native
Note: See TracChangeset for help on using the changeset viewer.