Changeset 1666 in josm


Ignore:
Timestamp:
Jun 13, 2009 7:26:19 AM (4 years ago)
Author:
Gubaer
Message:

bug fix: wrong merge state

Location:
trunk/src/org/openstreetmap/josm/gui/conflict/properties
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/conflict/properties/PropertiesMergeModel.java

    r1654 r1666  
    1919 
    2020/** 
    21  * This is the model for resolving conflicts in the values of same properties of 
    22  * {@see OsmPrimitive}. In particular, it represents conflicts in the coordiates of {@see Node}s and 
     21 * This is the model for resolving conflicts in the properties of thw 
     22 * {@see OsmPrimitive}s. In particular, it represents conflicts in the coordiates of {@see Node}s and 
    2323 * the deleted state of {@see OsmPrimitive}s. 
    2424 *  
     
    6969 
    7070    /** 
    71      * replies true if there is a coordiate conflict and if this conflict is 
     71     * replies true if there is a coordinate conflict and if this conflict is 
    7272     * resolved 
    7373     *  
    74      * @return true if there is a coordiate conflict and if this conflict is 
     74     * @return true if there is a coordinate conflict and if this conflict is 
    7575     * resolved; false, otherwise 
    7676     */ 
     
    9191 
    9292    /** 
    93      * replies true if the current decision for the coordiate conflict is <code>decision</code> 
    94      *  
    95      * @return true if the current decision for the coordiate conflict is <code>decision</code>; 
     93     * replies true if the current decision for the coordinate conflict is <code>decision</code> 
     94     *  
     95     * @return true if the current decision for the coordinate conflict is <code>decision</code>; 
    9696     *  false, otherwise 
    9797     */ 
     
    136136 
    137137 
     138    /** 
     139     * replies the coordinates of my {@see OsmPrimitive}. null, if my primitive hasn't 
     140     * coordinates (i.e. because it is a {@see Way}). 
     141     *  
     142     * @return the coordinates of my {@see OsmPrimitive}. null, if my primitive hasn't 
     143     *  coordinates (i.e. because it is a {@see Way}). 
     144     */ 
    138145    public LatLon getMyCoords() { 
    139146        return myCoords; 
    140147    } 
    141148 
     149    /** 
     150     * replies the coordinates of their {@see OsmPrimitive}. null, if their primitive hasn't 
     151     * coordinates (i.e. because it is a {@see Way}). 
     152     *  
     153     * @return the coordinates of my {@see OsmPrimitive}. null, if my primitive hasn't 
     154     * coordinates (i.e. because it is a {@see Way}). 
     155     */ 
    142156    public LatLon getTheirCoords() { 
    143157        return theirCoords; 
    144158    } 
    145159 
     160    /** 
     161     * replies the coordinates of the merged {@see OsmPrimitive}. null, if the current primitives 
     162     * have no coordinates or if the conflict is yet {@see MergeDecisionType#UNDECIDED} 
     163     *  
     164     * @return the coordinates of the merged {@see OsmPrimitive}. null, if the current primitives 
     165     * have no coordinates or if the conflict is yet {@see MergeDecisionType#UNDECIDED} 
     166     */ 
    146167    public LatLon getMergedCoords() { 
    147168        switch(coordMergeDecision) { 
     
    154175    } 
    155176 
     177    /** 
     178     * decides a conflict between my and their coordinates 
     179     *  
     180     * @param decision the decision 
     181     */ 
    156182    public void decideCoordsConflict(MergeDecisionType decision) { 
    157183        coordMergeDecision = decision; 
     
    161187    } 
    162188 
     189    /** 
     190     * replies my deleted state, 
     191     * @return 
     192     */ 
    163193    public Boolean getMyDeletedState() { 
    164194        return myDeletedState; 
     
    186216    } 
    187217 
     218    /** 
     219     * replies true if my and their primitive have a conflict between 
     220     * their coordinate values 
     221     *  
     222     * @return true if my and their primitive have a conflict between 
     223     * their coordinate values; false otherwise 
     224     */ 
    188225    public boolean hasCoordConflict() { 
    189226        if (myCoords == null && theirCoords != null) return true; 
     
    193230    } 
    194231 
     232    /** 
     233     * replies true if my and their primitive have a conflict between 
     234     * their deleted states 
     235     *  
     236     * @return true if my and their primitive have a conflict between 
     237     * their deleted states 
     238     */ 
    195239    public boolean hasDeletedStateConflict() { 
    196240        return myDeletedState != theirDeletedState; 
    197241    } 
    198242 
     243    /** 
     244     * replies true if all conflict in this model are resolved 
     245     *  
     246     * @return true if all conflict in this model are resolved; false otherwise 
     247     */ 
    199248    public boolean isResolvedCompletely() { 
    200249        boolean ret = true; 
     
    208257    } 
    209258 
     259    /** 
     260     * builds the command(s) to apply the conflict resolutions to my primitive 
     261     *  
     262     * @param my  my primitive 
     263     * @param their their primitive 
     264     * @return the list of commands 
     265     */ 
    210266    public List<Command> buildResolveCommand(OsmPrimitive my, OsmPrimitive their) { 
    211267        ArrayList<Command> cmds = new ArrayList<Command>(); 
     
    214270        } 
    215271        if (hasDeletedStateConflict() && isDecidedDeletedState()) { 
    216             cmds.add(new DeletedStateConflictResolveCommand(my, their, coordMergeDecision)); 
     272            cmds.add(new DeletedStateConflictResolveCommand(my, their, deletedMergeDecision)); 
    217273        } 
    218274        return cmds; 
  • trunk/src/org/openstreetmap/josm/gui/conflict/properties/PropertiesMerger.java

    r1654 r1666  
    2121 
    2222import org.openstreetmap.josm.data.coor.LatLon; 
    23 import org.openstreetmap.josm.data.osm.OsmPrimitive; 
    2423import org.openstreetmap.josm.gui.conflict.MergeDecisionType; 
    2524import org.openstreetmap.josm.tools.ImageProvider; 
Note: See TracChangeset for help on using the changeset viewer.