Changeset 1926 in josm for trunk/src/org
- Timestamp:
- 2009-08-08T09:22:24+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/PasteAction.java
r1925 r1926 100 100 } 101 101 } 102 rnew.members.clear(); 103 rnew.members.addAll(members); 102 rnew.setMembers(members); 104 103 map.put(r, rnew); 105 104 } -
trunk/src/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommand.java
r1814 r1926 43 43 44 44 @Override public boolean executeCommand() { 45 if (position < 0 || position >= relation. members.size()) {45 if (position < 0 || position >= relation.getMembersCount()) { 46 46 Main.debug("error changing the role"); 47 47 return false; 48 48 } 49 49 50 oldRole = relation. members.get(position).role;51 relation. members.get(position).role = newRole;50 oldRole = relation.getMember(position).role; 51 relation.getMember(position).role = newRole; 52 52 53 53 oldModified = relation.modified; … … 57 57 58 58 @Override public void undoCommand() { 59 relation. members.get(position).role = oldRole;59 relation.getMember(position).role = oldRole; 60 60 relation.modified = oldModified; 61 61 } -
trunk/src/org/openstreetmap/josm/data/osm/Relation.java
r1925 r1926 37 37 /** 38 38 * 39 * @param members 39 * @param members Can be null, in that case all members are removed 40 40 * @since 1925 41 41 */ 42 42 public void setMembers(List<RelationMember> members) { 43 43 this.members.clear(); 44 this.members.addAll(members); 44 if (members != null) { 45 this.members.addAll(members); 46 } 47 } 48 49 /** 50 * 51 * @since 1926 52 */ 53 public int getMembersCount() { 54 return members.size(); 55 } 56 57 /** 58 * 59 * @param index 60 * @return 61 * @since 1926 62 */ 63 public RelationMember getMember(int index) { 64 return members.get(index); 45 65 } 46 66 -
trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeVisitor.java
r1925 r1926 206 206 } 207 207 if (replacedSomething) { 208 r.members.clear(); 209 r.members.addAll(newMembers); 208 r.setMembers(newMembers); 210 209 } 211 210 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java
r1925 r1926 18 18 19 19 import org.openstreetmap.josm.Main; 20 import org.openstreetmap.josm.data.SelectionChangedListener;21 20 import org.openstreetmap.josm.data.osm.DataSet; 22 21 import org.openstreetmap.josm.data.osm.Node; … … 224 223 225 224 public void applyToRelation(Relation relation) { 226 relation.members.clear(); 227 relation.members.addAll(members); 225 relation.setMembers(members); 228 226 } 229 227
Note:
See TracChangeset
for help on using the changeset viewer.