Changeset 2668 in josm


Ignore:
Timestamp:
Dec 20, 2009 9:01:25 PM (3 years ago)
Author:
jttt
Message:

Fixed #4207 getCurrentDataSet() returns null after adding new layers (then null pointers exceptions); fixed drawing ways with real width

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

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

    r2667 r2668  
    250250        } 
    251251        if (realWidth > 0 && useRealWidth && !showDirection) { 
    252             int tmpWidth = (int) (100 /  (float) (circum / realWidth)); 
    253             if (tmpWidth > width) { 
    254                 width = tmpWidth; 
    255             } 
    256252 
    257253            /* if we have a "width" tag, try use it */ 
     
    263259            if(widthTag != null) { 
    264260                try { 
    265                     width = Integer.parseInt(widthTag); 
     261                    realWidth = Integer.parseInt(widthTag); 
    266262                } 
    267263                catch(NumberFormatException nfe) { 
    268264                } 
     265            } 
     266 
     267            int tmpWidth = (int) (100 /  (float) (circum / realWidth)); 
     268            if (tmpWidth > width) { 
     269                width = tmpWidth; 
    269270            } 
    270271        } 
  • trunk/src/org/openstreetmap/josm/gui/MapView.java

    r2666 r2668  
    582582 
    583583    private void setEditLayer() { 
    584         OsmDataLayer newEditLayer = null; 
     584        OsmDataLayer newEditLayer = editLayer; 
    585585        OsmDataLayer oldEditLayer = editLayer; 
    586586 
Note: See TracChangeset for help on using the changeset viewer.