Changeset 19528 in josm for trunk/test/functional


Ignore:
Timestamp:
2026-02-14T12:50:29+01:00 (17 hours ago)
Author:
stoecker
Message:

see #24637 - patch by zkir (modified a bit) - allow to handle more than one style in caching

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/functional/org/openstreetmap/josm/gui/mappaint/StyleCacheTest.java

    r19223 r19528  
    154154        nc.zoomTo(bounds);
    155155        visitor.render(dsCity2, true, bounds);
     156        ElemStyles elemStyles = MapPaintStyles.getStyles();
    156157
    157158        IdentityHashMap<StyleElementList, Integer> counter = new IdentityHashMap<>();
     
    159160        for (OsmPrimitive osm : dsCity2.allPrimitives()) {
    160161            // primitives, that have been rendered, should have the cache populated
    161             if (osm.getCachedStyle() != null) {
     162            if (osm.getCachedStyle(elemStyles) != null) {
    162163                noPrimitives++;
    163                 Pair<StyleElementList, Range> p = osm.getCachedStyle().getWithRange(nc.getDist100Pixel(), false);
     164                Pair<StyleElementList, Range> p = osm.getCachedStyle(elemStyles).getWithRange(nc.getDist100Pixel(), false);
    164165                StyleElementList sel = p.a;
    165166                assertNotNull(sel);
Note: See TracChangeset for help on using the changeset viewer.