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

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

File:
1 edited

Legend:

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

    r12287 r12630  
    4343import org.openstreetmap.josm.gui.DefaultNameFormatter;
    4444import org.openstreetmap.josm.gui.ExtendedDialog;
     45import org.openstreetmap.josm.gui.MainApplication;
     46import org.openstreetmap.josm.gui.MapFrame;
    4547import org.openstreetmap.josm.gui.Notification;
    4648import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     
    255257            list.addListSelectionListener(e -> {
    256258                final Way selected = list.getSelectedValue();
    257                 if (selected != null && Main.isDisplayingMapView() && selected.getNodesCount() > 1) {
     259                if (selected != null && MainApplication.isDisplayingMapView() && selected.getNodesCount() > 1) {
    258260                    final Collection<WaySegment> segments = new ArrayList<>(selected.getNodesCount() - 1);
    259261                    final Iterator<Node> it = selected.getNodes().iterator();
     
    272274        protected void setHighlightedWaySegments(Collection<WaySegment> segments) {
    273275            selectedWay.getDataSet().setHighlightedWaySegments(segments);
    274             Main.map.mapView.repaint();
     276            MainApplication.getMap().mapView.repaint();
    275277        }
    276278
     
    542544                Arrays.asList("outer", "inner", "forward", "backward", "north", "south", "east", "west"));
    543545
    544         final boolean isMapModeDraw = Main.map != null && Main.map.mapMode == Main.map.mapModeDraw;
     546        final MapFrame map = MainApplication.getMap();
     547        final boolean isMapModeDraw = map != null && map.mapMode == map.mapModeDraw;
    545548
    546549        // Change the original way
Note: See TracChangeset for help on using the changeset viewer.