Changeset 17108 in josm for trunk/src/org
- Timestamp:
- 2020-10-08T09:56:37+02:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/MapMode.java
r16553 r17108 74 74 readPreferences(); 75 75 MainApplication.getMap().mapView.setNewCursor(cursor, this); 76 MainApplication.getMap().statusLine.setAutoLength(true); 76 77 updateStatusLine(); 77 78 } -
trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java
r16119 r17108 164 164 setMode(Mode.NORMAL); 165 165 pWays = null; 166 167 166 super.enterMode(); 167 168 // #19887: overwrite default: we want to show the distance to the original way 169 MainApplication.getMap().statusLine.setAutoLength(false); 168 170 169 171 mv.addMouseListener(this); … … 187 189 MapFrame map = MainApplication.getMap(); 188 190 map.statusLine.setDist(-1); 189 map.statusLine. repaint();191 map.statusLine.setAutoLength(true); 190 192 map.keyDetector.removeModifierExListener(this); 191 193 removeWayHighlighting(sourceWays); … … 332 334 } else if (mode == Mode.DRAGGING) { 333 335 clearSourceWays(); 336 MainApplication.getMap().statusLine.setDist(pWays.getWays()); 334 337 } 335 338 -
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r17058 r17108 763 763 }; 764 764 765 /** see #19887: determine if the {@code distValue} field should be filled with length of selected object */ 766 private boolean autoLength = true; 767 765 768 private void registerListeners() { 766 769 // Listen to keyboard/mouse events for pressing/releasing alt key and inform the collector. … … 1186 1189 1187 1190 private void refreshDistText(Collection<? extends OsmPrimitive> newSelection) { 1191 if (!autoLength) { 1192 return; 1193 } 1194 1188 1195 if (newSelection.size() == 2) { 1189 1196 Iterator<? extends OsmPrimitive> it = newSelection.iterator(); … … 1264 1271 } 1265 1272 } 1273 1274 /** 1275 * Enable or disable the automatic refresh of the length field. 1276 * @param b if {@code true} the automatic refresh is enabled, else disabled 1277 * @since 17108 1278 */ 1279 public void setAutoLength(boolean b) { 1280 autoLength = b; 1281 } 1282 1283 1266 1284 }
Note:
See TracChangeset
for help on using the changeset viewer.