Ignore:
Timestamp:
2009-06-07T23:22:54+02:00 (15 years ago)
Author:
Gubaer
Message:

added merge support for coordinate conflicts
added merge support for conflicts due to different deleted states

Location:
trunk/src/org/openstreetmap/josm/command
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/TagConflictResolveCommand.java

    r1642 r1654  
    1616import org.openstreetmap.josm.data.osm.Relation;
    1717import org.openstreetmap.josm.data.osm.Way;
    18 import org.openstreetmap.josm.gui.conflict.tags.MergeDecisionType;
     18import org.openstreetmap.josm.gui.conflict.MergeDecisionType;
    1919import org.openstreetmap.josm.gui.conflict.tags.TagMergeItem;
    2020import org.openstreetmap.josm.tools.ImageProvider;
     
    121121        //
    122122        if (!Main.map.conflictDialog.conflicts.containsKey(my)) {
    123             Main.map.conflictDialog.conflicts.put(my,their);
     123            Main.map.conflictDialog.addConflict(my, their);
    124124        }
    125125    }
    126 
    127 
    128126}
  • trunk/src/org/openstreetmap/josm/command/VersionConflictResolveCommand.java

    r1642 r1654  
    8686        }
    8787    }
    88 
    89 
    9088}
  • trunk/src/org/openstreetmap/josm/command/WayNodesConflictResolverCommand.java

    r1622 r1654  
    2525
    2626    /** my way */
    27     private Way my;
    28     /** their way */ 
    29     private Way their;
     27    private final Way my;
     28    /** their way */
     29    private final Way their;
    3030    /** the list of merged nodes. This becomes the list of news of my way after the
    3131     *  command is executed
    3232     */
    33     private List<Node> mergedNodeList;
    34    
     33    private final List<Node> mergedNodeList;
     34
    3535    /**
    3636     *
    3737     * @param my my may
    3838     * @param their their way
    39      * @param mergedNodeList  the list of merged nodes 
     39     * @param mergedNodeList  the list of merged nodes
    4040     */
    4141    public WayNodesConflictResolverCommand(Way my, Way their, List<Node> mergedNodeList) {
     
    4444        this.mergedNodeList = mergedNodeList;
    4545    }
    46    
    47    
     46
     47
    4848    @Override
    4949    public MutableTreeNode description() {
    5050        return new DefaultMutableTreeNode(
    5151                new JLabel(
    52                    tr("Resolve conflicts in node list of of way {0}", my.id),
    53                    ImageProvider.get("data", "object"),
    54                    JLabel.HORIZONTAL
     52                        tr("Resolve conflicts in node list of of way {0}", my.id),
     53                        ImageProvider.get("data", "object"),
     54                        JLabel.HORIZONTAL
    5555                )
    56          );
     56        );
    5757    }
    5858
     
    6262        //
    6363        super.executeCommand();
    64        
     64
    6565        // replace the list of nodes of 'my' way by the list of merged
    66         // nodes 
     66        // nodes
    6767        //
    6868        my.nodes.clear();
     
    7474            }
    7575        }
    76         return true;       
     76        return true;
    7777    }
    7878
     
    8080    public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted,
    8181            Collection<OsmPrimitive> added) {
    82         modified.add(my);       
     82        modified.add(my);
    8383    }
    8484
     
    8888        //
    8989        super.undoCommand();
    90        
     90
    9191        // restore a conflict if necessary
    9292        //
    9393        if (!Main.map.conflictDialog.conflicts.containsKey(my)) {
    94             Main.map.conflictDialog.conflicts.put(my,their);
     94            Main.map.conflictDialog.addConflict(my, their);
    9595        }
    9696    }
Note: See TracChangeset for help on using the changeset viewer.