Ignore:
Timestamp:
2016-11-12T14:52:32+01:00 (7 years ago)
Author:
Don-vip
Message:

see #10387 - refactor various actions and commands so they can be used without data layer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/ChangeCommand.java

    r10216 r11240  
    1010import javax.swing.Icon;
    1111
     12import org.openstreetmap.josm.data.osm.DataSet;
    1213import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1314import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
     
    4748    public ChangeCommand(OsmDataLayer layer, OsmPrimitive osm, OsmPrimitive newOsm) {
    4849        super(layer);
     50        this.osm = osm;
     51        this.newOsm = newOsm;
     52        sanityChecks();
     53    }
     54
     55    /**
     56     * Constructs a new {@code ChangeCommand} in the context of a given data set.
     57     * @param data The data set
     58     * @param osm The existing primitive to modify
     59     * @param newOsm The new primitive
     60     * @since 11240
     61     */
     62    public ChangeCommand(DataSet data, OsmPrimitive osm, OsmPrimitive newOsm) {
     63        super(data);
    4964        this.osm = osm;
    5065        this.newOsm = newOsm;
Note: See TracChangeset for help on using the changeset viewer.