Changeset 13420 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
- Timestamp:
- 2018-02-12T23:19:49+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
r13104 r13420 19 19 import org.openstreetmap.josm.data.osm.visitor.paint.relations.Multipolygon; 20 20 import org.openstreetmap.josm.data.osm.visitor.paint.relations.MultipolygonCache; 21 import org.openstreetmap.josm.gui.MainApplication; 21 22 import org.openstreetmap.josm.gui.NavigatableComponent; 23 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 22 24 import org.openstreetmap.josm.gui.mappaint.DividedScale.RangeViolatedError; 23 25 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource; … … 90 92 preferenceCache.clear(); 91 93 backgroundColorCache = null; 94 MainApplication.getLayerManager().getLayersOfType(OsmDataLayer.class).forEach( 95 dl -> dl.data.clearMappaintCache()); 92 96 }); 93 97 } … … 139 143 */ 140 144 public Pair<StyleElementList, Range> getStyleCacheWithRange(OsmPrimitive osm, double scale, NavigatableComponent nc) { 141 if ( osm.mappaintStyle == null || osm.getMappaintCacheIdx() != cacheIdx|| scale <= 0) {145 if (!osm.isCachedStyleUpToDate() || scale <= 0) { 142 146 osm.mappaintStyle = StyleCache.EMPTY_STYLECACHE; 143 147 } else { … … 195 199 + ", scale: " + scale + ", new stylelist: " + p.a + ", new range: " + p.b + ')', e); 196 200 } 197 osm. setMappaintCacheIdx(cacheIdx);201 osm.declareCachedStyleUpToDate(); 198 202 return p; 199 203 }
Note:
See TracChangeset
for help on using the changeset viewer.