Changeset 12630 in josm for trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java
- Timestamp:
- 2017-08-24T00:15:51+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java
r12581 r12630 40 40 import org.openstreetmap.josm.data.preferences.IntegerProperty; 41 41 import org.openstreetmap.josm.data.preferences.StrokeProperty; 42 import org.openstreetmap.josm.gui.MainApplication; 43 import org.openstreetmap.josm.gui.MapFrame; 42 44 import org.openstreetmap.josm.gui.MapView; 43 45 import org.openstreetmap.josm.gui.draw.MapViewPath; … … 138 140 readPreferences(); 139 141 140 mv = Main.map.mapView; 142 MapFrame map = MainApplication.getMap(); 143 mv = map.mapView; 141 144 mousePos = null; 142 145 oldModeHelpText = ""; … … 148 151 updateStateByCurrentSelection(); 149 152 150 Main.map.mapView.addMouseListener(this);151 Main.map.mapView.addMouseMotionListener(this);152 Main.map.mapView.addTemporaryLayer(temporaryLayer);153 map.mapView.addMouseListener(this); 154 map.mapView.addMouseMotionListener(this); 155 map.mapView.addTemporaryLayer(temporaryLayer); 153 156 DataSet.addSelectionListener(this); 154 157 155 Main.map.keyDetector.addModifierExListener(this);158 map.keyDetector.addModifierExListener(this); 156 159 } 157 160 … … 165 168 super.exitMode(); 166 169 167 Main.map.mapView.removeMouseListener(this); 168 Main.map.mapView.removeMouseMotionListener(this); 169 Main.map.mapView.removeTemporaryLayer(temporaryLayer); 170 MapFrame map = MainApplication.getMap(); 171 map.mapView.removeMouseListener(this); 172 map.mapView.removeMouseMotionListener(this); 173 map.mapView.removeTemporaryLayer(temporaryLayer); 170 174 DataSet.removeSelectionListener(this); 171 175 172 Main.map.keyDetector.removeModifierExListener(this);176 map.keyDetector.removeModifierExListener(this); 173 177 temporaryLayer.invalidate(); 174 178 } … … 179 183 if (!newModeHelpText.equals(oldModeHelpText)) { 180 184 oldModeHelpText = newModeHelpText; 181 Main.map.statusLine.setHelpText(newModeHelpText); 182 Main.map.statusLine.repaint(); 185 MapFrame map = MainApplication.getMap(); 186 map.statusLine.setHelpText(newModeHelpText); 187 map.statusLine.repaint(); 183 188 } 184 189 } … … 348 353 @Override 349 354 public void modifiersExChanged(int modifiers) { 350 if (!Main .isDisplayingMapView() || !Main.map.mapView.isActiveLayerDrawable()) {355 if (!MainApplication.isDisplayingMapView() || !MainApplication.getMap().mapView.isActiveLayerDrawable()) { 351 356 return; 352 357 }
Note:
See TracChangeset
for help on using the changeset viewer.