Changeset 11470 in josm for trunk/src/org/openstreetmap/josm/gui/layer/gpx
- Timestamp:
- 2017-01-16T22:34:15+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
r11469 r11470 39 39 import org.openstreetmap.josm.data.preferences.ColorProperty; 40 40 import org.openstreetmap.josm.gui.MapView; 41 import org.openstreetmap.josm.gui.MapViewState; 41 42 import org.openstreetmap.josm.io.CachedFile; 42 43 import org.openstreetmap.josm.tools.ColorScale; … … 139 140 // some cached values 140 141 Rectangle heatMapCacheScreenBounds = new Rectangle(); 141 int heatMapCacheVisibleSegments; 142 double heatMapCacheZoomScale; 142 MapViewState heatMapMapViewState; 143 143 int heatMapCacheLineWith; 144 144 … … 538 538 539 539 // force redraw of image 540 heatMap CacheVisibleSegments = 0;540 heatMapMapViewState = null; 541 541 } 542 542 … … 1088 1088 // get bounds of screen image and projection, zoom and adjust input parameters 1089 1089 final Rectangle screenBounds = new Rectangle(mv.getWidth(), mv.getHeight()); 1090 final double zoomScale = mv.getScale(); 1090 final MapViewState mapViewState = mv.getState(); 1091 final double zoomScale = mapViewState.getScale(); 1091 1092 1092 1093 // adjust global settings ( zero = default line width ) … … 1117 1118 1118 1119 // recalculation of image needed 1119 final boolean imageRecalc = heatMapCacheVisibleSegments != visibleSegments.size() || 1120 heatMapCacheZoomScale != zoomScale || 1120 final boolean imageRecalc = !mapViewState.equalsInWindow(heatMapMapViewState) || 1121 1121 heatMapCacheLineWith != globalLineWidth; 1122 1122 … … 1141 1141 1142 1142 // remember draw parameters 1143 heatMapCacheVisibleSegments = visibleSegments.size(); 1144 heatMapCacheZoomScale = zoomScale; 1143 heatMapMapViewState = mapViewState; 1145 1144 heatMapCacheLineWith = globalLineWidth; 1146 1145 }
Note:
See TracChangeset
for help on using the changeset viewer.