Changeset 33694 in osm for applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/TheRing.java
- Timestamp:
- 2017-10-03T22:34:26+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/TheRing.java
r33530 r33694 17 17 import org.openstreetmap.josm.command.Command; 18 18 import org.openstreetmap.josm.command.DeleteCommand; 19 import org.openstreetmap.josm.data.osm.DataSet; 19 20 import org.openstreetmap.josm.data.osm.Node; 20 21 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 22 23 import org.openstreetmap.josm.data.osm.RelationMember; 23 24 import org.openstreetmap.josm.data.osm.Way; 25 import org.openstreetmap.josm.gui.MainApplication; 24 26 import org.openstreetmap.josm.tools.Geometry; 25 27 import org.openstreetmap.josm.tools.Geometry.PolygonIntersection; … … 329 331 Way sourceCopy = new Way(source); 330 332 if (createMultipolygon) { 331 Collection<String> linearTags = Main.pref.get Collection(PREF_MULTIPOLY + "lineartags", CreateMultipolygonAction.DEFAULT_LINEAR_TAGS);333 Collection<String> linearTags = Main.pref.getList(PREF_MULTIPOLY + "lineartags", CreateMultipolygonAction.DEFAULT_LINEAR_TAGS); 332 334 relation = new Relation(); 333 335 relation.put("type", "multipolygon"); … … 369 371 } 370 372 373 DataSet ds = MainApplication.getLayerManager().getEditDataSet(); 371 374 List<Command> commands = new ArrayList<>(); 372 375 boolean foundOwnWay = false; … … 375 378 Way w = seg.constructWay(seg.isReference() ? null : sourceCopy); 376 379 if (needAdding) { 377 commands.add(new AddCommand(w)); 380 commands.add(new AddCommand(ds, w)); 378 381 } 379 382 if (w.equals(source)) { … … 398 401 commands.addAll(relationCommands); 399 402 if (createMultipolygon) { 400 commands.add(new AddCommand(relation)); 403 commands.add(new AddCommand(ds, relation)); 401 404 } 402 405 return commands;
Note:
See TracChangeset
for help on using the changeset viewer.
