Changeset 33902 in osm for applications/editors/josm/plugins/importvec
- Timestamp:
- 2017-11-25T01:54:14+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/importvec/src/org/openstreetmap/josm/plugins/importvec/SvgImportTask.java
r33564 r33902 5 5 package org.openstreetmap.josm.plugins.importvec; 6 6 7 import com.kitfox.svg.Group;8 import com.kitfox.svg.SVGDiagram;9 import com.kitfox.svg.SVGElement;10 import com.kitfox.svg.SVGUniverse;11 import com.kitfox.svg.ShapeElement;12 7 import java.awt.Shape; 13 8 import java.awt.geom.AffineTransform; … … 20 15 import java.util.LinkedList; 21 16 import java.util.List; 17 22 18 import org.openstreetmap.josm.Main; 23 19 import org.openstreetmap.josm.command.AddCommand; … … 26 22 import org.openstreetmap.josm.data.coor.EastNorth; 27 23 import org.openstreetmap.josm.data.coor.LatLon; 24 import org.openstreetmap.josm.data.osm.DataSet; 28 25 import org.openstreetmap.josm.data.osm.Node; 29 26 import org.openstreetmap.josm.data.osm.Way; … … 34 31 import org.openstreetmap.josm.io.OsmTransferException; 35 32 import org.openstreetmap.josm.tools.I18n; 33 34 import com.kitfox.svg.Group; 35 import com.kitfox.svg.SVGDiagram; 36 import com.kitfox.svg.SVGElement; 37 import com.kitfox.svg.SVGUniverse; 38 import com.kitfox.svg.ShapeElement; 36 39 37 40 /** … … 185 188 throw new IOException(e); 186 189 } 187 LinkedList<Command> cmds = new LinkedList<>(); 190 DataSet ds = MainApplication.getLayerManager().getEditDataSet(); 191 List<Command> cmds = new ArrayList<>(); 188 192 for (Node n : nodes) { 189 cmds.add(new AddCommand( n));193 cmds.add(new AddCommand(ds, n)); 190 194 } 191 195 for (Way w : ways) { 192 cmds.add(new AddCommand( w));196 cmds.add(new AddCommand(ds, w)); 193 197 } 194 198 MainApplication.undoRedo.add(new SequenceCommand("Import primitives", cmds));
Note:
See TracChangeset
for help on using the changeset viewer.