Changeset 9291 in josm
- Timestamp:
- 2016-01-03T23:59:26+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
r9230 r9291 72 72 String errMsg = null; 73 73 int errorTime = Notification.TIME_DEFAULT; 74 if (checkSelection (selection)) {74 if (checkSelectionOneNodeAtMostOneWay(selection)) { 75 75 if (!checkAndConfirmOutlyingUnglue()) { 76 76 // FIXME: Leaving action without clearing selectedNode, selectedWay, selectedNodes … … 94 94 if (!selfCrossing) 95 95 if (checkForUnglueNode(selection)) { 96 unglue Node(e);96 unglueOneNodeAtMostOneWay(e); 97 97 } else { 98 98 errorTime = Notification.TIME_SHORT; … … 103 103 unglueWays(); 104 104 } 105 } else if (checkSelection 2(selection)) {105 } else if (checkSelectionOneWayAnyNodes(selection)) { 106 106 if (!checkAndConfirmOutlyingUnglue()) { 107 107 // FIXME: Leaving action without clearing selectedNode, selectedWay, selectedNodes … … 130 130 // and then do the work. 131 131 selectedNodes = tmpNodes; 132 unglue Ways2();132 unglueOneWayAnyNodes(); 133 133 } 134 134 } else { … … 167 167 * @param e event that trigerred the action 168 168 */ 169 private void unglue Node(ActionEvent e) {169 private void unglueOneNodeAtMostOneWay(ActionEvent e) { 170 170 List<Command> cmds = new LinkedList<>(); 171 171 … … 227 227 * @return true if either one node is selected or one node and one way are selected and the node is part of the way 228 228 */ 229 private boolean checkSelection (Collection<? extends OsmPrimitive> selection) {229 private boolean checkSelectionOneNodeAtMostOneWay(Collection<? extends OsmPrimitive> selection) { 230 230 231 231 int size = selection.size(); … … 262 262 * @return true if one way and any number of nodes that are part of that way are selected 263 263 */ 264 private boolean checkSelection 2(Collection<? extends OsmPrimitive> selection) {264 private boolean checkSelectionOneWayAnyNodes(Collection<? extends OsmPrimitive> selection) { 265 265 if (selection.isEmpty()) 266 266 return false; … … 467 467 * 468 468 */ 469 private void unglue Ways2() {469 private void unglueOneWayAnyNodes() { 470 470 List<Command> cmds = new LinkedList<>(); 471 471 List<Node> allNewNodes = new LinkedList<>();
Note:
See TracChangeset
for help on using the changeset viewer.