Changeset 5897 in josm for trunk


Ignore:
Timestamp:
2013-04-21T15:11:28+02:00 (7 years ago)
Author:
Don-vip
Message:

see #8582 - Use Main.removeLayer() everywhere

Location:
trunk/src/org/openstreetmap/josm
Files:
6 edited

Legend:

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

    r5896 r5897  
    753753                Collection<Layer> layers = new ArrayList<Layer>(Main.map.mapView.getAllLayers());
    754754                for (Layer l: layers) {
    755                     Main.map.mapView.removeLayer(l);
     755                    Main.main.removeLayer(l);
    756756                }
    757757            }
  • trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java

    r5297 r5897  
    4747                        }
    4848                        targetLayer.mergeFrom(sourceLayer);
    49                         Main.map.mapView.removeLayer(sourceLayer);
     49                        Main.main.removeLayer(sourceLayer);
    5050                        layerMerged = true;
    5151                    }
  • trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java

    r5874 r5897  
    309309        if (Main.map.mapView.getLayersOfType(OsmDataLayer.class).isEmpty()) {
    310310            if (errorLayer != null) {
    311                 Main.map.mapView.removeLayer(errorLayer);
     311                Main.main.removeLayer(errorLayer);
    312312            }
    313313        }
  • trunk/src/org/openstreetmap/josm/gui/MapFrame.java

    r5670 r5897  
    9191     * The view control displayed.
    9292     */
    93     public MapView mapView;
     93    public final MapView mapView;
    9494    /**
    9595     * The toolbar with the action icons. To add new toggle dialog actions, use addToggleDialog
     
    155155        setSize(400,400);
    156156        setLayout(new BorderLayout());
    157 
    158157
    159158        mapView = new MapView(contentPane, viewportData);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java

    r5891 r5897  
    5757import org.openstreetmap.josm.gui.SideButton;
    5858import org.openstreetmap.josm.gui.help.HelpUtil;
    59 import org.openstreetmap.josm.gui.io.SaveLayersDialog;
    6059import org.openstreetmap.josm.gui.layer.JumpToMarkerActions;
    6160import org.openstreetmap.josm.gui.layer.Layer;
     
    6362import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    6463import org.openstreetmap.josm.gui.util.GuiHelper;
     64import org.openstreetmap.josm.gui.widgets.JosmTextField;
    6565import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher;
    6666import org.openstreetmap.josm.tools.CheckParameterUtil;
     
    7171import org.openstreetmap.josm.tools.MultikeyShortcutAction.MultikeyInfo;
    7272import org.openstreetmap.josm.tools.Shortcut;
    73 import org.openstreetmap.josm.gui.widgets.JosmTextField;
    7473
    7574/**
     
    9291            throw new IllegalStateException("Dialog was already created");
    9392        instance = new LayerListDialog(mapFrame);
    94 
    9593    }
    9694
  • trunk/src/org/openstreetmap/josm/gui/layer/ValidatorLayer.java

    r5671 r5897  
    157157    public void layerRemoved(Layer oldLayer) {
    158158        if (oldLayer instanceof OsmDataLayer &&  Main.map.mapView.getEditLayer() == null) {
    159             Main.map.mapView.removeLayer(this);
     159            Main.main.removeLayer(this);
    160160        } else if (oldLayer == this) {
    161161            MapView.removeLayerChangeListener(this);
Note: See TracChangeset for help on using the changeset viewer.