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


Ignore:
Timestamp:
2009-12-06T18:18:04+01:00 (14 years ago)
Author:
jttt
Message:

Fix #4114 NPE when zooming out while relation editor is open

File:
1 edited

Legend:

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

    r2580 r2590  
    741741
    742742        /* rotate icon with direction last node in from to */
    743         ImageIcon rotatedIcon = ImageProvider.createRotatedImage(null /*icon2*/, inactive || r.isDisabled() ? 
    744                                                                                     nodeStyle.getDisabledIcon() :
    745                                                                                     nodeStyle.icon, iconAngle);
     743        ImageIcon rotatedIcon = ImageProvider.createRotatedImage(null /*icon2*/, inactive || r.isDisabled() ?
     744                nodeStyle.getDisabledIcon() :
     745                    nodeStyle.icon, iconAngle);
    746746
    747747        /* scale down icon to 16*16 pixels */
     
    13111311    boolean drawable(OsmPrimitive osm)
    13121312    {
    1313         return !osm.isDeleted() && !osm.isFiltered() && !osm.isIncomplete();
     1313        return osm.isUsable() && !osm.isFiltered();
    13141314    }
    13151315
     
    13891389            for (final Way osm : selectedLast(data, data.searchWays(bbox))) {
    13901390                if (drawable(osm) && osm.mappaintDrawnCode != paintid) {
    1391                     if (isPrimitiveArea(osm) && osm.mappaintDrawnAreaCode != paintid)
     1391                    if (isPrimitiveArea(osm) && osm.mappaintDrawnAreaCode != paintid) {
    13921392                        drawWay(osm, fillAreas);
    1393                     else
     1393                    } else {
    13941394                        noAreaWays.add(osm);
     1395                    }
    13951396                }
    13961397            }
Note: See TracChangeset for help on using the changeset viewer.