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/gui/dialogs/relation/MemberTable.java

    r10683 r12630  
    2828import org.openstreetmap.josm.data.osm.RelationMember;
    2929import org.openstreetmap.josm.data.osm.Way;
     30import org.openstreetmap.josm.gui.MainApplication;
    3031import org.openstreetmap.josm.gui.dialogs.relation.sort.WayConnectionType;
    3132import org.openstreetmap.josm.gui.dialogs.relation.sort.WayConnectionType.Direction;
     
    108109
    109110    private transient ListSelectionListener highlighterListener = lse -> {
    110         if (Main.isDisplayingMapView()) {
     111        if (MainApplication.isDisplayingMapView()) {
    111112            Collection<RelationMember> sel = getMemberTableModel().getSelectedMembers();
    112113            final Set<OsmPrimitive> toHighlight = new HashSet<>();
     
    117118            }
    118119            SwingUtilities.invokeLater(() -> {
    119                 if (Main.isDisplayingMapView() && highlightHelper.highlightOnly(toHighlight)) {
    120                     Main.map.mapView.repaint();
     120                if (MainApplication.isDisplayingMapView() && highlightHelper.highlightOnly(toHighlight)) {
     121                    MainApplication.getMap().mapView.repaint();
    121122                }
    122123            });
     
    128129        if (!highlightEnabled) return;
    129130        getMemberTableModel().getSelectionModel().addListSelectionListener(highlighterListener);
    130         if (Main.isDisplayingMapView()) {
     131        if (MainApplication.isDisplayingMapView()) {
    131132            HighlightHelper.clearAllHighlighted();
    132             Main.map.mapView.repaint();
     133            MainApplication.getMap().mapView.repaint();
    133134        }
    134135    }
     
    153154        getMemberTableModel().getSelectionModel().removeListSelectionListener(highlighterListener);
    154155        highlighterListener = null;
    155         if (Main.isDisplayingMapView()) {
     156        if (MainApplication.isDisplayingMapView()) {
    156157            HighlightHelper.clearAllHighlighted();
    157             Main.map.mapView.repaint();
     158            MainApplication.getMap().mapView.repaint();
    158159        }
    159160    }
Note: See TracChangeset for help on using the changeset viewer.