Changeset 25905 in osm for applications/editors
- Timestamp:
- 2011-04-26T10:05:44+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/buildings_tools/src/buildings_tools/Building.java
r25893 r25905 12 12 import java.util.LinkedList; 13 13 import java.util.List; 14 import java.util.Map.Entry; 14 15 15 16 import javax.swing.JOptionPane; … … 220 221 221 222 /** 222 * Returns a node with "building=yes" tagunder the building223 * Returns a node with address tags under the building 223 224 * 224 225 * @return … … 231 232 nodesloop: 232 233 for (Node n : Main.main.getCurrentDataSet().searchNodes(bbox)) { 233 if (!n.isUsable() || n.getKeys().get("building") == null)234 if (!n.isUsable()) 234 235 continue; 236 tagcheck: do { 237 for (String key : n.getKeys().keySet()) { 238 if (key.equals("building") || key.startsWith("addr:")) 239 break tagcheck; 240 } 241 continue nodesloop; 242 } while (false); 235 243 double x = projection1(latlon2eastNorth(n.getCoor())); 236 244 double y = projection2(latlon2eastNorth(n.getCoor())); … … 289 297 cmds.add(new AddCommand(nodes[i])); 290 298 } 299 w.setKeys(ToolSettings.getTags()); 291 300 cmds.add(new AddCommand(w)); 292 301 Node addrNode; 293 302 if (ToolSettings.PROP_USE_ADDR_NODE.get() && (addrNode = getAddressNode()) != null) { 294 w.setKeys(addrNode.getKeys()); 303 for (Entry<String, String> entry : addrNode.getKeys().entrySet()) { 304 w.put(entry.getKey(), entry.getValue()); 305 } 295 306 for (OsmPrimitive p : addrNode.getReferrers()) { 296 307 Relation r = (Relation) p; … … 306 317 } 307 318 cmds.add(new DeleteCommand(addrNode)); 308 } else {309 w.setKeys(ToolSettings.getTags());310 319 } 311 320 Command c = new SequenceCommand(tr("Create building"), cmds);
Note:
See TracChangeset
for help on using the changeset viewer.