- Timestamp:
- 2009-09-17T22:38:08+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/conflict/tags
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
r2104 r2157 28 28 import org.openstreetmap.josm.data.osm.Node; 29 29 import org.openstreetmap.josm.data.osm.OsmPrimitive; 30 import org.openstreetmap.josm.data.osm.Tag;31 30 import org.openstreetmap.josm.data.osm.TagCollection; 32 31 import org.openstreetmap.josm.data.osm.Way; -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java
r2103 r2157 93 93 RelationMemberConflictDecision d = decisions.get(row); 94 94 switch(column) { 95 case 0: /* relation */ return d.getRelation();96 case 1: /* pos */ return Integer.toString(d.getPos() + 1); // position in "user space" starting at 197 case 2: /* role */ return d.getRole();98 case 3: /* original */ return d.getOriginalPrimitive();99 case 4: /* decision */ return d.getDecision();95 case 0: /* relation */ return d.getRelation(); 96 case 1: /* pos */ return Integer.toString(d.getPos() + 1); // position in "user space" starting at 1 97 case 2: /* role */ return d.getRole(); 98 case 3: /* original */ return d.getOriginalPrimitive(); 99 case 4: /* decision */ return d.getDecision(); 100 100 } 101 101 return null; … … 106 106 RelationMemberConflictDecision d = decisions.get(row); 107 107 switch(column) { 108 case 2: /* role */109 d.setRole((String)value);110 break;111 case 4: /* decision */112 d.decide((RelationMemberConflictDecisionType)value);113 refresh();114 break;108 case 2: /* role */ 109 d.setRole((String)value); 110 break; 111 case 4: /* decision */ 112 d.decide((RelationMemberConflictDecisionType)value); 113 refresh(); 114 break; 115 115 } 116 116 fireTableDataChanged(); … … 160 160 public void populate(Collection<RelationToChildReference> references) { 161 161 references = references == null ? new LinkedList<RelationToChildReference>() : references; 162 decisions.clear(); 162 163 if (references.isEmpty()) { 163 164 this.relations = new HashSet<Relation>(references.size()); 164 return; 165 } 166 decisions.clear(); 167 this.relations = new HashSet<Relation>(references.size()); 165 } else { 166 this.relations = new HashSet<Relation>(references.size()); 167 } 168 168 for (RelationToChildReference reference: references) { 169 169 decisions.add(new RelationMemberConflictDecision(reference.getParent(), reference.getPosition())); … … 234 234 } else { 235 235 switch(decision.getDecision()) { 236 case REPLACE:237 rmNew = new RelationMember(decision.getRole(),newPrimitive);238 modifiedRelation.addMember(rmNew);239 isChanged |= ! rm.equals(rmNew);240 break;241 case REMOVE:242 isChanged = true;243 // do nothing244 break;245 case UNDECIDED:246 // FIXME: this is an error247 break;236 case REPLACE: 237 rmNew = new RelationMember(decision.getRole(),newPrimitive); 238 modifiedRelation.addMember(rmNew); 239 isChanged |= ! rm.equals(rmNew); 240 break; 241 case REMOVE: 242 isChanged = true; 243 // do nothing 244 break; 245 case UNDECIDED: 246 // FIXME: this is an error 247 break; 248 248 } 249 249 } … … 279 279 } 280 280 switch(decision.getDecision()) { 281 case REMOVE: return true;282 case REPLACE:283 if (!relation.getMember(i).getRole().equals(decision.getRole()))284 return true;285 if (relation.getMember(i).getMember() != newPrimitive)286 return true;287 case UNDECIDED:288 // FIXME: handle error281 case REMOVE: return true; 282 case REPLACE: 283 if (!relation.getMember(i).getRole().equals(decision.getRole())) 284 return true; 285 if (relation.getMember(i).getMember() != newPrimitive) 286 return true; 287 case UNDECIDED: 288 // FIXME: handle error 289 289 } 290 290 }
Note:
See TracChangeset
for help on using the changeset viewer.