Changeset 34807 in osm for applications/editors/josm/plugins
- Timestamp:
- 2019-01-03T12:52:40+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/Building.java
r34724 r34807 337 337 w = ways.get(0); 338 338 339 addAddress(w );339 addAddress(w, null); 340 340 341 341 return w; … … 386 386 cmds.add(new AddCommand(ds, w)); 387 387 388 addAddress(w );388 addAddress(w, cmds); 389 389 390 390 if (snap) { … … 452 452 } 453 453 454 private void addAddress(Way w ) {454 private void addAddress(Way w, Collection<Command> cmdList) { 455 455 if (ToolSettings.PROP_USE_ADDR_NODE.get()) { 456 456 Node addrNode = getAddressNode(); 457 457 if (addrNode != null) { 458 Collection<Command> addressCmds = new LinkedList<>();458 Collection<Command> addressCmds = cmdList != null ? cmdList : new LinkedList<>(); 459 459 for (Entry<String, String> entry : addrNode.getKeys().entrySet()) { 460 460 w.put(entry.getKey(), entry.getValue()); … … 473 473 } 474 474 addressCmds.add(new DeleteCommand(addrNode)); 475 Command c = new SequenceCommand(tr("Add address for building"), addressCmds); 476 UndoRedoHandler.getInstance().add(c); 475 if (cmdList == null) { 476 Command c = new SequenceCommand(tr("Add address for building"), addressCmds); 477 UndoRedoHandler.getInstance().add(c); 478 } 477 479 } 478 480 }
Note:
See TracChangeset
for help on using the changeset viewer.