Changeset 4290 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2011-08-08T00:00:54+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java
r4234 r4290 176 176 public void visit(Relation r) 177 177 { 178 if ( !r.isUsable())178 if (!r.isUsable() || r.hasIncompleteMembers()) 179 179 return; 180 180 List<RelationMember> rMembers=r.getMembers(); -
trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
r4209 r4290 300 300 301 301 if (relation instanceof Relation) { 302 if ( relationHasIncompleteMember((Relation) relation)) {302 if (((Relation) relation).hasIncompleteMembers()) { 303 303 name += ", "+tr("incomplete"); 304 304 } … … 364 364 return (r1.getMembersCount() > r2.getMembersCount())?1:-1; 365 365 366 comp = Boolean.valueOf(r elationHasIncompleteMember(r1)).compareTo(Boolean.valueOf(relationHasIncompleteMember(r2)));366 comp = Boolean.valueOf(r1.hasIncompleteMembers()).compareTo(Boolean.valueOf(r2.hasIncompleteMembers())); 367 367 if (comp != 0) 368 368 return comp; … … 443 443 } 444 444 return null; 445 }446 447 private boolean relationHasIncompleteMember(Relation relation) {448 for (RelationMember m : relation.getMembers()) {449 if (m.getMember().isIncomplete())450 return true;451 }452 return false;453 445 } 454 446
Note:
See TracChangeset
for help on using the changeset viewer.