Changeset 351 in josm for trunk/src/org/openstreetmap/josm/actions/mapmode
- Timestamp:
- 2007-10-07T22:43:56+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/AddNodeAction.java
r343 r351 150 150 return; 151 151 } 152 // If ALT is held, instead of creating a new node, re-use an existing152 // If SHIFT is held, instead of creating a new node, re-use an existing 153 153 // node (making this action identical to AddSegmentAction with the 154 154 // small difference that the node used will then be selected to allow … … 191 191 cmds.add(new AddCommand(way)); 192 192 } else { 193 if (insertInto != null && way == insertInto.way) { 194 way = newInsertInto; 193 if (insertInto != null) { 194 if (way == insertInto.way) { 195 way = newInsertInto; 196 } 195 197 } else { 196 198 Way wnew = new Way(way); … … 222 224 Way way = null; 223 225 for (Way w : Main.ds.ways) { 226 if (w.nodes.size() < 1) continue; 224 227 int i = w.nodes.indexOf(n); 225 if (i == -1) continue; 226 if (i == 0 || i == w.nodes.size() - 1) { 227 if (way != null) 228 return null; 229 way = w; 230 } 228 if (w.nodes.get(0) == n || w.nodes.get(w.nodes.size() - 1) == n) { 229 if (way != null) 230 return null; 231 way = w; 231 232 } 233 } 232 234 return way; 233 235 }
Note:
See TracChangeset
for help on using the changeset viewer.