Ignore:
Timestamp:
2017-09-04T00:50:22+02:00 (2 years ago)
Author:
Don-vip
Message:

see #13036 - see #15229 - see #15182 - make Commands depends only on a DataSet, not a Layer. This removes a lot of GUI dependencies

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Geometry.java

    r12713 r12718  
    3737import org.openstreetmap.josm.gui.MainApplication;
    3838import org.openstreetmap.josm.gui.MapFrame;
    39 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    4039
    4140/**
     
    103102        }
    104103
    105         OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer();
    106104        DataSet dataset = ways.get(0).getDataSet();
    107105
     
    210208
    211209                                if (intNode == newNode) {
    212                                     cmds.add(layer != null ? new AddCommand(layer, intNode) : new AddCommand(dataset, intNode));
     210                                    cmds.add(new AddCommand(dataset, intNode));
    213211                                }
    214212                            }
  • trunk/src/org/openstreetmap/josm/tools/RightAndLefthandTraffic.java

    r12688 r12718  
    104104        }
    105105        // Purge all other ways and relations so dataset only contains lefthand traffic data
    106         PurgeCommand.build(null, toPurge, null).executeCommand();
     106        PurgeCommand.build(toPurge, null).executeCommand();
    107107        // Combine adjacent countries into a single polygon
    108108        Collection<Way> optimizedWays = new ArrayList<>();
Note: See TracChangeset for help on using the changeset viewer.