Changeset 17550 in osm for applications
- Timestamp:
- 2009-09-09T00:25:42+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/utilsplugin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin/build.xml
r17437 r17550 25 25 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 26 26 <attribute name="Plugin-Description" value="Several utilities that make your life easier: e.g. simplify way, join areas, jump to position."/> 27 <attribute name="Plugin-Mainversion" value="20 39"/>27 <attribute name="Plugin-Mainversion" value="2082"/> 28 28 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 29 29 </manifest> -
applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/JoinAreasAction.java
r17436 r17550 444 444 for (Relation r : Main.main.getCurrentDataSet().relations) { 445 445 if (r.isDeleted() || r.incomplete) continue; 446 for (RelationMember rm : r. members) {447 if (rm. member!= osm) continue;446 for (RelationMember rm : r.getMembers()) { 447 if (rm.getMember() != osm) continue; 448 448 449 449 Relation newRel = new Relation(r); 450 newRel.members.remove(rm); 450 List<RelationMember> members = newRel.getMembers(); 451 members.remove(rm); 452 newRel.setMembers(members); 451 453 452 454 cmds.add(new ChangeCommand(r, newRel)); 453 RelationRole saverel = new RelationRole(r, rm. role);455 RelationRole saverel = new RelationRole(r, rm.getRole()); 454 456 if(!result.contains(saverel)) result.add(saverel); 455 457 break; … … 782 784 newRel.put("type", "multipolygon"); 783 785 for(Way w : inner) 784 newRel. members.add(new RelationMember("inner", w));786 newRel.addMember(new RelationMember("inner", w)); 785 787 cmds.add(new AddCommand(newRel)); 786 788 … … 811 813 // Add it back! 812 814 Relation newRel = new Relation(r.rel); 813 newRel. members.add(new RelationMember(r.role, outer));815 newRel.addMember(new RelationMember(r.role, outer)); 814 816 cmds.add(new ChangeCommand(r.rel, newRel)); 815 817 } … … 822 824 // Found only one to be part of a multipolygon relation, so just add it back as well 823 825 newRel = new Relation(multiouters.get(0).rel); 824 newRel. members.add(new RelationMember(multiouters.get(0).role, outer));826 newRel.addMember(new RelationMember(multiouters.get(0).role, outer)); 825 827 cmds.add(new ChangeCommand(multiouters.get(0).rel, newRel)); 826 828 return; … … 830 832 for(RelationRole r : multiouters) { 831 833 // Add members 832 for(RelationMember rm : r.rel. members)833 if(!newRel. members.contains(rm)) newRel.members.add(rm);834 for(RelationMember rm : r.rel.getMembers()) 835 if(!newRel.getMembers().contains(rm)) newRel.addMember(rm); 834 836 // Add tags 835 837 for (String key : r.rel.keySet()) { … … 839 841 cmds.add(new DeleteCommand(r.rel)); 840 842 } 841 newRel. members.add(new RelationMember("outer", outer));843 newRel.addMember(new RelationMember("outer", outer)); 842 844 cmds.add(new AddCommand(newRel)); 843 845 }
Note:
See TracChangeset
for help on using the changeset viewer.