Changeset 118 in josm


Ignore:
Timestamp:
2006-07-20T17:30:46+02:00 (19 years ago)
Author:
imi
Message:
  • fixed scale bar color reset after every JOSM restart
  • fixed NPE when selecting in straight-line mode from single node
  • fixed import of trackpoint-time for tracks with more than <time> tag
Location:
src/org/openstreetmap/josm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/actions/mapmode/SelectionAction.java

    r105 r118  
    202202        private Node addNearest(Collection<OsmPrimitive> path, Node start, Node end) {
    203203                Collection<Segment> c = reverseSegmentMap.get(start);
    204                 //if (c == null)
    205                         //return null; // start may be a waypoint without segments
     204                if (c == null)
     205                        return null; // start may be a waypoint without segments
    206206                double min = Double.MAX_VALUE;
    207207                Node next = null;
  • src/org/openstreetmap/josm/data/Preferences.java

    r117 r118  
    143143        public final void upgrade(int oldVersion) {
    144144                if (oldVersion > 117) return;
    145                 properties.put("color.scale", ColorHelper.color2html(Color.white));
     145                if (!properties.containsKey("color.scale"))
     146                        properties.put("color.scale", ColorHelper.color2html(Color.white));
    146147        }
    147148}
  • src/org/openstreetmap/josm/gui/PreferenceDialog.java

    r117 r118  
    8888                                        sb.append(";"+annotationSources.getModel().getElementAt(i));
    8989                                Main.pref.put("annotation.sources", sb.toString().substring(1));
    90                         }
     90                        } else
     91                                Main.pref.put("annotation.sources", null);
    9192
    9293                        for (int i = 0; i < colors.getRowCount(); ++i) {
  • src/org/openstreetmap/josm/io/RawGpsReader.java

    r110 r118  
    3232                public Collection<Collection<GpsPoint>> data = new LinkedList<Collection<GpsPoint>>();
    3333                private LatLon currentLatLon;
    34                 private String currentTime = null;
     34                private String currentTime = "";
    3535                private Stack<String> tags = new Stack<String>();
    3636
     
    4949                        throw new SAXException(e);
    5050                }
     51                currentTime = "";
    5152                        }
    5253                        tags.push(qName);
     
    6970                        if (qName.equals("wpt") || qName.equals("trkpt")) {
    7071                                current.add(new GpsPoint(currentLatLon, currentTime));
    71                         } else if (qName.equals("trkseg") || qName.equals("trk") || qName.equals("gpx"))
     72                                currentTime = "";
     73                        } else if (qName.equals("trkseg") || qName.equals("trk") || qName.equals("gpx")) {
    7274                                newTrack();
    73                        
    74                         if (!qName.equals("time"))
    7575                                currentTime = "";
     76                        }
    7677                        tags.pop();
    7778        }
Note: See TracChangeset for help on using the changeset viewer.