Changeset 6913 in josm for trunk/src/org
- Timestamp:
- 2014-03-19T13:25:23+01:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java
r6807 r6913 324 324 * @return a list of commands to execute 325 325 */ 326 p rivatestatic List<Command> removeTagsFromWaysIfNeeded( Relation relation ) {326 public static List<Command> removeTagsFromWaysIfNeeded( Relation relation ) { 327 327 Map<String, String> values = new HashMap<String, String>(relation.getKeys()); 328 328 -
trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
r6830 r6913 52 52 public class JoinAreasAction extends JosmAction { 53 53 // This will be used to commit commands and unite them into one large command sequence at the end 54 private LinkedList<Command> cmds = new LinkedList<Command>();54 private final LinkedList<Command> cmds = new LinkedList<Command>(); 55 55 private int cmdsCount = 0; 56 private final LinkedList<Relation> addedRelations = new LinkedList<Relation>(); 56 57 57 58 /** … … 316 317 public void actionPerformed(ActionEvent e) { 317 318 LinkedList<Way> ways = new LinkedList<Way>(Main.main.getCurrentDataSet().getSelectedWays()); 318 319 addedRelations.clear(); 320 319 321 if (ways.isEmpty()) { 320 322 new Notification( … … 373 375 374 376 if (result.hasChanges) { 375 377 // move tags from ways to newly created relations 378 // TODO: do we need to also move tags for the modified relations? 379 for (Relation r: addedRelations) { 380 cmds.addAll(CreateMultipolygonAction.removeTagsFromWaysIfNeeded(r)); 381 } 382 commitCommands(tr("Move tags from ways to relations")); 383 376 384 List<Way> allWays = new ArrayList<Way>(); 377 385 for (Multipolygon pol : result.polygons) { … … 1307 1315 } 1308 1316 cmds.add(new AddCommand(newRel)); 1317 addedRelations.add(newRel); 1309 1318 1310 1319 // We don't add outer to the relation because it will be handed to fixRelations()
Note:
See TracChangeset
for help on using the changeset viewer.