Changeset 19528 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
- Timestamp:
- 2026-02-14T12:50:29+01:00 (2 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
r17867 r19528 164 164 public Pair<StyleElementList, Range> getStyleCacheWithRange(IPrimitive osm, double scale, NavigatableComponent nc) { 165 165 synchronized (osm.getStyleCacheSyncObject()) { 166 if (!osm.isCachedStyleUpToDate() || scale <= 0) { 167 osm.setCachedStyle(StyleCache.EMPTY_STYLECACHE); 166 if (!osm.isCachedStyleUpToDate(this) || scale <= 0) { 167 osm.setCachedStyle(this, StyleCache.EMPTY_STYLECACHE); 168 168 } else { 169 Pair<StyleElementList, Range> lst = osm.getCachedStyle().getWithRange(scale, osm.isSelected()); 169 Pair<StyleElementList, Range> lst = osm.getCachedStyle(this).getWithRange(scale, osm.isSelected()); 170 170 if (lst.a != null) 171 171 return lst; … … 217 217 } 218 218 } 219 StyleCache style = osm.getCachedStyle() != null ? osm.getCachedStyle() : StyleCache.EMPTY_STYLECACHE; 219 StyleCache style = osm.getCachedStyle(this) != null ? osm.getCachedStyle(this) : StyleCache.EMPTY_STYLECACHE; 220 220 try { 221 osm.setCachedStyle(style.put(p.a, p.b, osm.isSelected())); 221 osm.setCachedStyle(this, style.put(p.a, p.b, osm.isSelected())); 222 222 } catch (RangeViolatedError e) { 223 223 throw new AssertionError("Range violated: " + e.getMessage() 224 + " (object: " + osm.getPrimitiveId() + ", current style: " + osm.getCachedStyle() 224 + " (object: " + osm.getPrimitiveId() + ", current style: " + osm.getCachedStyle(this) 225 225 + ", scale: " + scale + ", new stylelist: " + p.a + ", new range: " + p.b + ')', e); 226 226 } 227 osm.declareCachedStyleUpToDate(); 227 osm.declareCachedStyleUpToDate(this); 228 228 return p; 229 229 }
Note:
See TracChangeset
for help on using the changeset viewer.
