Changeset 19214 in josm
- Timestamp:
- 2024-09-09T17:55:46+02:00 (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/AddPrimitivesCommand.java
r18801 r19214 10 10 import java.util.Optional; 11 11 import java.util.stream.Collectors; 12 13 import javax.swing.Icon;14 12 15 13 import org.openstreetmap.josm.data.osm.DataSet; … … 69 67 public boolean executeCommand() { 70 68 DataSet ds = getAffectedDataSet(); 69 ds.update(() -> this.executeRealCommand(ds)); 70 if (toSelect != null) { 71 ds.setSelected(toSelect.stream().map(ds::getPrimitiveById).collect(Collectors.toList())); 72 } 73 return true; 74 } 75 76 private void executeRealCommand(DataSet ds) { 71 77 if (createdPrimitives == null) { // first time execution 72 78 List<OsmPrimitive> newPrimitives = new ArrayList<>(data.size()); … … 110 116 } 111 117 } 112 if (toSelect != null) {113 ds.setSelected(toSelect.stream().map(ds::getPrimitiveById).collect(Collectors.toList()));114 }115 return true;116 118 } 117 119 … … 150 152 151 153 @Override 152 public Icon getDescriptionIcon() {153 return null;154 }155 156 @Override157 154 public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, 158 155 Collection<OsmPrimitive> added) {
Note:
See TracChangeset
for help on using the changeset viewer.