Changeset 3392 in josm for trunk/src/org/openstreetmap/josm/command
- Timestamp:
- 2010-07-29T08:22:51+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/DeleteCommand.java
r3336 r3392 23 23 import javax.swing.JOptionPane; 24 24 import javax.swing.JPanel; 25 import javax.swing.tree.DefaultMutableTreeNode;26 import javax.swing.tree.MutableTreeNode;27 25 28 26 import org.openstreetmap.josm.Main; … … 185 183 186 184 @Override public Collection<PseudoCommand> getChildren() { 187 if (toDelete.size() == 1) {185 if (toDelete.size() == 1) 188 186 return null; 189 }else {187 else { 190 188 List<PseudoCommand> children = new ArrayList<PseudoCommand>(); 191 189 for (final OsmPrimitive osm : toDelete) { … … 193 191 @Override public JLabel getDescription() { 194 192 return new JLabel( 195 tr("Deleted ''{0}''", 196 osm.getDisplayName(DefaultNameFormatter.getInstance())), 197 ImageProvider.get(OsmPrimitiveType.from(osm)), JLabel.HORIZONTAL); 198 193 tr("Deleted ''{0}''", 194 osm.getDisplayName(DefaultNameFormatter.getInstance())), 195 ImageProvider.get(OsmPrimitiveType.from(osm)), JLabel.HORIZONTAL); 196 } 199 197 @Override public Collection<? extends OsmPrimitive> getParticipatingPrimitives() { 200 198 return Collections.singleton(osm); … … 425 423 chunks.add(n1); 426 424 chunks.add(n2); 427 return SplitWayAction.splitWay(layer,ws.way, chunks).getCommand(); 425 return SplitWayAction.splitWay(layer,ws.way, chunks, Collections.<OsmPrimitive>emptyList()).getCommand(); 428 426 } 429 427 } … … 443 441 if (a != null) { 444 442 for (OsmPrimitive osm : primitivesToDelete) { 445 if (osm.isIncomplete()) 443 if (osm.isIncomplete()) { 446 444 incomplete = true; 447 else if (osm instanceof Node && !osm.isNewOrUndeleted() 448 && !a.contains(((Node) osm).getCoor())) 445 } else if (osm instanceof Node && !osm.isNewOrUndeleted() 446 && !a.contains(((Node) osm).getCoor())) { 449 447 outside = true; 448 } 450 449 } 451 450 } … … 453 452 { 454 453 for (OsmPrimitive osm : primitivesToDelete) 455 if (osm.isIncomplete()) 454 if (osm.isIncomplete()) { 456 455 incomplete = true; 456 } 457 457 } 458 458 if(outside)
Note:
See TracChangeset
for help on using the changeset viewer.