Changeset 3269 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2010-05-22T23:22:23+02:00 (15 years ago)
Author:
stoecker
Message:

also render names when they are in the multipolygon relation itself

Location:
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint
Files:
2 edited

Legend:

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

    r3167 r3269  
    184184            if (fillAreas > dist)
    185185            {
    186                 painter.drawArea(getPolygon(w), (data.isSelected(w) ? paintSettings.getSelectedColor() : areaStyle.color), painter.getWayName(w));
     186                painter.drawArea(getPolygon(w), (data.isSelected(w) ? paintSettings.getSelectedColor() : areaStyle.color), painter.getAreaName(w));
    187187                if(!w.isClosed()) {
    188188                    putError(w, tr("Area style way is not closed."), true);
     
    203203                areaStyle.getLineStyle().paintPrimitive(way, paintSettings, painter, true);
    204204                if(area) {
    205                     painter.drawArea(getPolygon(way), (areaselected ? paintSettings.getSelectedColor() : areaStyle.color), painter.getWayName(way));
     205                    painter.drawArea(getPolygon(way), (areaselected ? paintSettings.getSelectedColor() : areaStyle.color), painter.getAreaName(way));
    206206                }
    207207            } else {
     
    497497
    498498                    boolean selected = pd.selected || data.isSelected(r);
    499                     painter.drawArea(p, selected ? paintSettings.getSelectedColor() : areaStyle.color, null);
     499                    painter.drawArea(p, selected ? paintSettings.getSelectedColor() : areaStyle.color, painter.getAreaName(r));
    500500                    visible = true;
    501501                }
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPainter.java

    r3222 r3269  
    2121import org.openstreetmap.josm.Main;
    2222import org.openstreetmap.josm.data.osm.Node;
     23import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2324import org.openstreetmap.josm.data.osm.Way;
    2425import org.openstreetmap.josm.gui.NavigatableComponent;
     
    396397
    397398    //TODO Not a good place for this method
    398     public String getWayName(Way w) {
     399    public String getAreaName(OsmPrimitive w) {
    399400        String name = null;
    400401        if (w.hasKeys()) {
Note: See TracChangeset for help on using the changeset viewer.