Changeset 1930 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2009-08-08T11:59:13+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/RelationMember.java
r1928 r1930 12 12 public String role; 13 13 public OsmPrimitive member; 14 15 /** 16 * 17 * @return Role name or "". Never returns null 18 * @since 1930 19 */ 20 public String getRole() { 21 if (role == null) { 22 return ""; 23 } else { 24 return role; 25 } 26 } 27 28 /** 29 * 30 * @return True if role is set 31 * @since 1930 32 */ 33 public boolean hasRole() { 34 return role != null && !"".equals(role); 35 } 14 36 15 37 /** -
trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
r1925 r1930 556 556 w.getName()), true); 557 557 } 558 else if("from".equals(m. role)) {558 else if("from".equals(m.getRole())) { 559 559 if(fromWay != null) 560 560 r.putError(tr("More than one \"from\" way found."), true); … … 562 562 fromWay = w; 563 563 } 564 } else if("to".equals(m. role)) {564 } else if("to".equals(m.getRole())) { 565 565 if(toWay != null) 566 566 r.putError(tr("More than one \"to\" way found."), true); … … 568 568 toWay = w; 569 569 } 570 } else if("via".equals(m. role)) {570 } else if("via".equals(m.getRole())) { 571 571 if(via != null) 572 572 r.putError(tr("More than one \"via\" found."), true); … … 575 575 } 576 576 else 577 r.putError(tr("Unknown role ''{0}''.", m. role), true);577 r.putError(tr("Unknown role ''{0}''.", m.getRole()), true); 578 578 } 579 579 else if(m.member instanceof Node) 580 580 { 581 581 Node n = (Node) m.member; 582 if("via".equals(m. role))582 if("via".equals(m.getRole())) 583 583 { 584 584 if(via != null) … … 588 588 } 589 589 else 590 r.putError(tr("Unknown role ''{0}''.", m. role), true);590 r.putError(tr("Unknown role ''{0}''.", m.getRole()), true); 591 591 } 592 592 else … … 801 801 w.getName()), true); 802 802 } 803 else if("inner".equals(m. role))803 else if("inner".equals(m.getRole())) 804 804 inner.add(w); 805 else if("outer".equals(m. role))805 else if("outer".equals(m.getRole())) 806 806 outer.add(w); 807 807 else 808 808 { 809 809 r.putError(tr("No useful role ''{0}'' for Way ''{1}''.", 810 m.role == null ? "" : m.role, w.getName()), true);811 if( m.role == null || m.role.length() == 0)810 m.getRole(), w.getName()), true); 811 if(!m.hasRole()) 812 812 outer.add(w); 813 813 else if(r.isSelected())
Note:
See TracChangeset
for help on using the changeset viewer.