Ignore:
Timestamp:
2017-08-24T00:15:51+02:00 (20 months ago)
Author:
Don-vip
Message:

see #15182 - deprecate Main.map and Main.isDisplayingMapView(). Replacements: gui.MainApplication.getMap() / gui.MainApplication.isDisplayingMapView()

Location:
trunk/src/org/openstreetmap/josm/gui/io
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/AbstractPrimitiveTask.java

    r10611 r12630  
    77import java.util.Set;
    88
    9 import org.openstreetmap.josm.Main;
    109import org.openstreetmap.josm.actions.AutoScaleAction;
    1110import org.openstreetmap.josm.data.osm.DataSet;
     
    1615import org.openstreetmap.josm.data.osm.Way;
    1716import org.openstreetmap.josm.gui.ExceptionDialogUtil;
     17import org.openstreetmap.josm.gui.MainApplication;
    1818import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    1919import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     
    186186        GuiHelper.runInEDTAndWait(() -> {
    187187            layer.mergeFrom(ds);
    188             if (zoom && Main.map != null)
     188            if (zoom && MainApplication.getMap() != null)
    189189                AutoScaleAction.zoomTo(ds.allPrimitives());
    190190            layer.onPostDownloadFromServer();
  • trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java

    r12370 r12630  
    2828import org.openstreetmap.josm.Main;
    2929import org.openstreetmap.josm.data.osm.Changeset;
     30import org.openstreetmap.josm.gui.MainApplication;
    3031import org.openstreetmap.josm.gui.widgets.HistoryComboBox;
    3132import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
     
    8485        sourceLabel.addHyperlinkListener(e -> {
    8586            if (HyperlinkEvent.EventType.ACTIVATED.equals(e.getEventType())) {
    86                 final String source = Main.map.mapView.getLayerInformationForSourceTag();
     87                final String source = MainApplication.getMap().mapView.getLayerInformationForSourceTag();
    8788                hcbUploadSource.setText(Utils.shortenString(source, Changeset.MAX_CHANGESET_TAG_LENGTH));
    8889                // Fix #9965
Note: See TracChangeset for help on using the changeset viewer.