Ignore:
Timestamp:
2017-10-03T22:34:26+02:00 (9 years ago)
Author:
donvip
Message:

fix #josm15320

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/TheRing.java

    r33530 r33694  
    1717import org.openstreetmap.josm.command.Command;
    1818import org.openstreetmap.josm.command.DeleteCommand;
     19import org.openstreetmap.josm.data.osm.DataSet;
    1920import org.openstreetmap.josm.data.osm.Node;
    2021import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    2223import org.openstreetmap.josm.data.osm.RelationMember;
    2324import org.openstreetmap.josm.data.osm.Way;
     25import org.openstreetmap.josm.gui.MainApplication;
    2426import org.openstreetmap.josm.tools.Geometry;
    2527import org.openstreetmap.josm.tools.Geometry.PolygonIntersection;
     
    329331        Way sourceCopy = new Way(source);
    330332        if (createMultipolygon) {
    331             Collection<String> linearTags = Main.pref.getCollection(PREF_MULTIPOLY + "lineartags", CreateMultipolygonAction.DEFAULT_LINEAR_TAGS);
     333            Collection<String> linearTags = Main.pref.getList(PREF_MULTIPOLY + "lineartags", CreateMultipolygonAction.DEFAULT_LINEAR_TAGS);
    332334            relation = new Relation();
    333335            relation.put("type", "multipolygon");
     
    369371        }
    370372
     373        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    371374        List<Command> commands = new ArrayList<>();
    372375        boolean foundOwnWay = false;
     
    375378            Way w = seg.constructWay(seg.isReference() ? null : sourceCopy);
    376379            if (needAdding) {
    377                 commands.add(new AddCommand(w));
     380                commands.add(new AddCommand(ds, w));
    378381            }
    379382            if (w.equals(source)) {
     
    398401        commands.addAll(relationCommands);
    399402        if (createMultipolygon) {
    400             commands.add(new AddCommand(relation));
     403            commands.add(new AddCommand(ds, relation));
    401404        }
    402405        return commands;
Note: See TracChangeset for help on using the changeset viewer.