Ignore:
Timestamp:
2010-03-23T13:02:14+01:00 (12 years ago)
Author:
Gubaer
Message:

SplitWayAction slightly refactored, going to need this somewhere else

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

Legend:

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

    r2025 r3152  
    1414import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    1515import org.openstreetmap.josm.gui.DefaultNameFormatter;
     16import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    1617import org.openstreetmap.josm.tools.ImageProvider;
    1718
     
    2728    private final OsmPrimitive newOsm;
    2829
     30
    2931    public ChangeCommand(OsmPrimitive osm, OsmPrimitive newOsm) {
    3032        super();
     33        this.osm = osm;
     34        this.newOsm = newOsm;
     35    }
     36
     37    public ChangeCommand(OsmDataLayer layer, OsmPrimitive osm, OsmPrimitive newOsm) {
     38        super(layer);
    3139        this.osm = osm;
    3240        this.newOsm = newOsm;
     
    4755        String msg = "";
    4856        switch(OsmPrimitiveType.from(osm)) {
    49             case NODE: msg = marktr("Change node {0}"); break;
    50             case WAY: msg = marktr("Change way {0}"); break;
    51             case RELATION: msg = marktr("Change relation {0}"); break;
     57        case NODE: msg = marktr("Change node {0}"); break;
     58        case WAY: msg = marktr("Change way {0}"); break;
     59        case RELATION: msg = marktr("Change relation {0}"); break;
    5260        }
    5361        return new DefaultMutableTreeNode(
  • trunk/src/org/openstreetmap/josm/command/DeleteCommand.java

    r3055 r3152  
    407407            chunks.add(n1);
    408408            chunks.add(n2);
    409             return SplitWayAction.splitWay(ws.way, chunks).getCommand();
     409            return SplitWayAction.splitWay(layer,ws.way, chunks).getCommand();
    410410        }
    411411    }
Note: See TracChangeset for help on using the changeset viewer.