Ignore:
Timestamp:
2016-06-12T20:46:23+02:00 (3 years ago)
Author:
stoecker
Message:

gsoc-core - patch by Michael Zangl - see #12953 - remove deprecation usage

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

Legend:

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

    r9989 r10364  
    3838    @Override
    3939    public void undoCommand() {
    40         Main.map.mapView.getEditLayer().data.setSelected(oldSelection);
     40        Main.getLayerManager().getEditLayer().data.setSelected(oldSelection);
    4141    }
    4242
    4343    @Override
    4444    public boolean executeCommand() {
    45         oldSelection = Main.map.mapView.getEditLayer().data.getSelected();
    46         Main.map.mapView.getEditLayer().data.setSelected(newSelection);
     45        oldSelection = Main.getLayerManager().getEditLayer().data.getSelected();
     46        Main.getLayerManager().getEditLayer().data.setSelected(newSelection);
    4747        return true;
    4848    }
  • trunk/src/org/openstreetmap/josm/command/conflict/ConflictAddCommand.java

    r9371 r10364  
    6262    @Override
    6363    public void undoCommand() {
    64         if (Main.isDisplayingMapView() && !Main.map.mapView.hasLayer(getLayer())) {
     64        if (Main.isDisplayingMapView() && !Main.getLayerManager().containsLayer(getLayer())) {
    6565            Main.warn(tr("Layer ''{0}'' does not exist any more. Cannot remove conflict for object ''{1}''.",
    6666                    getLayer().getName(),
  • trunk/src/org/openstreetmap/josm/command/conflict/ConflictResolveCommand.java

    r9371 r10364  
    7171
    7272        if (Main.isDisplayingMapView()) {
    73             if (!Main.map.mapView.hasLayer(getLayer())) {
     73            if (!Main.getLayerManager().containsLayer(getLayer())) {
    7474                Main.warn(tr("Cannot undo command ''{0}'' because layer ''{1}'' is not present any more",
    7575                        this.toString(),
     
    7979            }
    8080
    81             Main.map.mapView.setActiveLayer(getLayer());
     81            Main.getLayerManager().setActiveLayer(getLayer());
    8282        }
    8383        reconstituteConflicts();
  • trunk/src/org/openstreetmap/josm/command/conflict/RelationMemberConflictResolverCommand.java

    r9371 r10364  
    7575    public void undoCommand() {
    7676        OsmDataLayer layer = getLayer();
    77         if (!Main.map.mapView.hasLayer(layer)) {
     77        if (!Main.getLayerManager().containsLayer(layer)) {
    7878            Main.warn(tr("Cannot undo command ''{0}'' because layer ''{1}'' is not present any more",
    7979                    this.toString(),
     
    8383        }
    8484
    85         Main.map.mapView.setActiveLayer(layer);
     85        Main.getLayerManager().setActiveLayer(layer);
    8686        OsmDataLayer editLayer = Main.main.getEditLayer();
    8787
Note: See TracChangeset for help on using the changeset viewer.