Changeset 36130 in osm for applications/editors
- Timestamp:
- 2023-09-07T15:32:08+02:00 (14 months ago)
- Location:
- applications/editors/josm/plugins/utilsplugin2
- Files:
-
- 7 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitObjectAction.java
r35842 r36130 47 47 import org.openstreetmap.josm.spi.preferences.Config; 48 48 import org.openstreetmap.josm.tools.CheckParameterUtil; 49 import org.openstreetmap.josm.tools.Logging; 49 50 import org.openstreetmap.josm.tools.Pair; 50 51 import org.openstreetmap.josm.tools.Shortcut; … … 52 53 /** 53 54 * Splits a closed way (polygon) into two closed ways or a multipolygon into two separate multipolygons. 54 * 55 * <p> 55 56 * The closed ways are just split at the selected nodes (which must be exactly two). 56 57 * The nodes remain in their original order. 57 * 58 * <p> 58 59 * This is similar to SplitWayAction with the addition that the split ways are closed 59 60 * immediately. … … 74 75 /** 75 76 * Called when the action is executed. 76 * 77 * <p> 77 78 * This method performs an expensive check whether the selection clearly defines one 78 79 * of the split actions outlined above, and if yes, calls the splitObject method. … … 259 260 if (splitWay != null) { 260 261 result.executeCommand(); 261 DeleteCommand delCmd = new DeleteCommand(splitWay);262 Command delCmd = DeleteCommand.delete(Collections.singletonList(splitWay)); 262 263 delCmd.executeCommand(); 263 264 UndoRedoHandler.getInstance().add(new SplitObjectCommand(Arrays.asList(result, delCmd)), false); … … 337 338 338 339 } catch (IllegalArgumentException e) { 340 Logging.trace(e); 339 341 // Changes were already undone in splitMultipolygonAtWay 340 342 showWarningNotification(e.getMessage());
Note:
See TracChangeset
for help on using the changeset viewer.