Ignore:
Timestamp:
2017-11-25T01:54:14+01:00 (7 years ago)
Author:
donvip
Message:

fix deprecation warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/importvec/src/org/openstreetmap/josm/plugins/importvec/SvgImportTask.java

    r33564 r33902  
    55package org.openstreetmap.josm.plugins.importvec;
    66
    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;
    127import java.awt.Shape;
    138import java.awt.geom.AffineTransform;
     
    2015import java.util.LinkedList;
    2116import java.util.List;
     17
    2218import org.openstreetmap.josm.Main;
    2319import org.openstreetmap.josm.command.AddCommand;
     
    2622import org.openstreetmap.josm.data.coor.EastNorth;
    2723import org.openstreetmap.josm.data.coor.LatLon;
     24import org.openstreetmap.josm.data.osm.DataSet;
    2825import org.openstreetmap.josm.data.osm.Node;
    2926import org.openstreetmap.josm.data.osm.Way;
     
    3431import org.openstreetmap.josm.io.OsmTransferException;
    3532import org.openstreetmap.josm.tools.I18n;
     33
     34import com.kitfox.svg.Group;
     35import com.kitfox.svg.SVGDiagram;
     36import com.kitfox.svg.SVGElement;
     37import com.kitfox.svg.SVGUniverse;
     38import com.kitfox.svg.ShapeElement;
    3639
    3740/**
     
    185188            throw new IOException(e);
    186189        }
    187         LinkedList<Command> cmds = new LinkedList<>();
     190        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
     191        List<Command> cmds = new ArrayList<>();
    188192        for (Node n : nodes) {
    189             cmds.add(new AddCommand(n));
     193            cmds.add(new AddCommand(ds, n));
    190194        }
    191195        for (Way w : ways) {
    192             cmds.add(new AddCommand(w));
     196            cmds.add(new AddCommand(ds, w));
    193197        }
    194198        MainApplication.undoRedo.add(new SequenceCommand("Import primitives", cmds));
Note: See TracChangeset for help on using the changeset viewer.