Changeset 1701 in josm


Ignore:
Timestamp:
Jun 27, 2009 2:14:00 AM (4 years ago)
Author:
Gubaer
Message:

updated merge logic and unit tests for MergeVisitor

Location:
trunk
Files:
3 added
1 edited

Legend:

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

    r1699 r1701  
    110110                } 
    111111                if (my.hasEqualSemanticAttributes(other)) { 
    112                     // copy the technical attributes from their 
    113                     // version 
    114                     if (other.deleted) { 
    115                         myDataSet.unlinkReferencesToPrimitive(my); 
    116                         my.delete(true); 
     112                    if (my.deleted != other.deleted) { 
     113                        // differences in deleted state have to be merged manually 
     114                        // 
     115                        conflicts.put(my, other); 
     116                    } else { 
     117                        // copy the technical attributes from other 
     118                        // version 
     119                        my.visible = other.visible; 
     120                        my.user = other.user; 
     121                        my.setTimestamp(other.getTimestamp()); 
     122                        my.modified = other.modified; 
     123                        merged.put(other, my); 
    117124                    } 
    118                     my.visible = other.visible; 
    119                     my.user = other.user; 
    120                     my.setTimestamp(other.getTimestamp()); 
    121                     my.modified = other.modified; 
    122                     merged.put(other, my); 
    123125                    return; 
    124126                } 
Note: See TracChangeset for help on using the changeset viewer.