Changeset 12630 in josm for trunk/src/org/openstreetmap/josm/actions/mapmode/MapMode.java
- Timestamp:
- 2017-08-24T00:15:51+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/MapMode.java
r12526 r12630 16 16 import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener; 17 17 import org.openstreetmap.josm.data.osm.OsmPrimitive; 18 import org.openstreetmap.josm.gui.MainApplication; 18 19 import org.openstreetmap.josm.gui.MapFrame; 19 20 import org.openstreetmap.josm.gui.layer.Layer; … … 99 100 Main.pref.addPreferenceChangeListener(this); 100 101 readPreferences(); 101 Main .map.mapView.setNewCursor(cursor, this);102 MainApplication.getMap().mapView.setNewCursor(cursor, this); 102 103 updateStatusLine(); 103 104 } … … 109 110 putValue("active", Boolean.FALSE); 110 111 Main.pref.removePreferenceChangeListener(this); 111 Main .map.mapView.resetCursor(this);112 MainApplication.getMap().mapView.resetCursor(this); 112 113 } 113 114 114 115 protected void updateStatusLine() { 115 if (Main.map != null && Main.map.statusLine != null) { 116 Main.map.statusLine.setHelpText(getModeHelpText()); 117 Main.map.statusLine.repaint(); 116 MapFrame map = MainApplication.getMap(); 117 if (map != null && map.statusLine != null) { 118 map.statusLine.setHelpText(getModeHelpText()); 119 map.statusLine.repaint(); 118 120 } 119 121 } … … 134 136 @Override 135 137 public void actionPerformed(ActionEvent e) { 136 if (Main.isDisplayingMapView()) { 137 Main .map.selectMapMode(this);138 if (MainApplication.isDisplayingMapView()) { 139 MainApplication.getMap().selectMapMode(this); 138 140 } 139 141 } … … 225 227 if (isEnabled()) { 226 228 // request focus in order to enable the expected keyboard shortcuts (see #8710) 227 Main .map.mapView.requestFocus();229 MainApplication.getMap().mapView.requestFocus(); 228 230 } 229 231 }
Note:
See TracChangeset
for help on using the changeset viewer.
