Changeset 2996 in josm
- Timestamp:
- 2010-02-16T09:30:28+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Tag.java
r2512 r2996 110 110 Tag other = (Tag) obj; 111 111 return key.equals(other.getKey()) && value.equals(other.getValue()); 112 } else {112 } else 113 113 return false; 114 }115 114 } 116 115 -
trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java
r2990 r2996 117 117 } 118 118 119 private HashSet<Tag> tags; 119 private final HashSet<Tag> tags = new HashSet<Tag>(); 120 120 121 121 /** … … 123 123 */ 124 124 public TagCollection() { 125 tags = new HashSet<Tag>();126 125 } 127 126 … … 133 132 */ 134 133 public TagCollection(TagCollection other) { 135 this();136 134 if (other != null) { 137 135 tags.addAll(other.tags); -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
r2779 r2996 222 222 List<Command> cmds = new LinkedList<Command>(); 223 223 224 if (getTagConflictResolverModel().getNumDecisions() > 0) {225 TagCollection tc = getTagConflictResolverModel().getResolution();226 cmds.addAll(buildTagChangeCommand(targetPrimitive, tc));224 TagCollection allResolutions = getTagConflictResolverModel().getAllResolutions(); 225 if (allResolutions.size() > 0) { 226 cmds.addAll(buildTagChangeCommand(targetPrimitive, allResolutions)); 227 227 } 228 228 if (targetPrimitive.get("created_by") != null) { -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java
r2990 r2996 182 182 } 183 183 184 //TODO Should this method work with all decisions or only with displayed decisions? For MergeNodes it should be 185 //all decisions, but this method is also used on other places, so I've made new method just for MergeNodes 184 186 public TagCollection getResolution() { 185 187 TagCollection tc = new TagCollection(); 186 188 for (String key: displayedKeys) { 187 189 tc.add(decisions.get(key).getResolution()); 190 } 191 return tc; 192 } 193 194 public TagCollection getAllResolutions() { 195 TagCollection tc = new TagCollection(); 196 for (MultiValueResolutionDecision value: decisions.values()) { 197 tc.add(value.getResolution()); 188 198 } 189 199 return tc;
Note:
See TracChangeset
for help on using the changeset viewer.