Changeset 263 in josm for src/org/openstreetmap/josm


Ignore:
Timestamp:
2007-06-21T01:56:21+02:00 (17 years ago)
Author:
framm
Message:
  • properly merge nodes on import (fixes #166)
File:
1 edited

Legend:

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

    r226 r263  
    229229
    230230        private void fixSegment(Segment ls) {
    231             if (mergedNodes.containsKey(ls.from))
     231                System.out.println("fix seg" +ls+ " mn="+mergedNodes.size());
     232               
     233            if (mergedNodes.containsKey(ls.from)) {
    232234                ls.from = mergedNodes.get(ls.from);
    233             if (mergedNodes.containsKey(ls.to))
     235                System.out.println("fix from");
     236            }
     237            if (mergedNodes.containsKey(ls.to))  {
    234238                ls.to = mergedNodes.get(ls.to);
     239                System.out.println("fix to");
     240            }
    235241    }
    236242
     
    307313                        Date d1 = my.timestamp == null ? new Date(0) : my.timestamp;
    308314                        Date d2 = other.timestamp == null ? new Date(0) : other.timestamp;
    309                         if (my.realEqual(other, false))
     315                        if (my.realEqual(other, false)) {
     316                                if (merged != null)
     317                                        merged.put(other, my);
    310318                                return true; // no merge needed.
     319                        }
    311320                        if (my.realEqual(other, true)) {
    312321                                // they differ in modified/timestamp combination only. Auto-resolve it.
Note: See TracChangeset for help on using the changeset viewer.