Changeset 3156 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2010-03-25T20:53:23+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
r3152 r3156 190 190 191 191 List<List<Node>> wayChunks = buildSplitChunks(selectedWay, selectedNodes); 192 SplitWayResult result = splitWay(getEditLayer(),selectedWay, wayChunks); 193 Main.main.undoRedo.add(result.getCommand()); 194 getCurrentDataSet().setSelected(result.getNewSelection()); 192 if (wayChunks != null) { 193 SplitWayResult result = splitWay(getEditLayer(),selectedWay, wayChunks); 194 Main.main.undoRedo.add(result.getCommand()); 195 getCurrentDataSet().setSelected(result.getNewSelection()); 196 } 195 197 } 196 198 … … 219 221 * Splits the nodes of {@code wayToSplit} into a list of node sequences 220 222 * which are separated at the nodes in {@code splitPoints}. 221 * 223 * 222 224 * This method displays warning messages if {@code wayToSplit} and/or 223 225 * {@code splitPoints} aren't consistent. 224 * 226 * 225 227 * Returns null, if building the split chunks fails. 226 * 228 * 227 229 * @param wayToSplit the way to split. Must not be null. 228 230 * @param splitPoints the nodes where the way is split. Must not be null. … … 481 483 * Splits the way {@code way} at the nodes in {@code atNodes} and replies 482 484 * the result of this process in an instance of {@see SplitWayResult}. 483 * 485 * 484 486 * Note that changes are not applied to the data yet. You have to 485 487 * submit the command in {@see SplitWayResult#getCommand()} first, 486 488 * i.e. {@code Main.main.undoredo.add(result.getCommand())}. 487 * 489 * 488 490 * Replies null if the way couldn't be split at the given nodes. 489 * 491 * 490 492 * @param layer the layer which the way belongs to. Must not be null. 491 493 * @param way the way to split. Must not be null.
Note:
See TracChangeset
for help on using the changeset viewer.