Changeset 17745 in josm for trunk/src


Ignore:
Timestamp:
2021-04-11T12:35:17+02:00 (4 years ago)
Author:
simon04
Message:

fix #20739 - MapCSS: evaluate class on current and on default layer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactory.java

    r17744 r17745  
    690690        @Override
    691691        public boolean applies(Environment env) {
    692             Cascade cascade = env.getCascade();
     692            return Environment.DEFAULT_LAYER.equals(env.layer)
     693                    ? applies(env, env.layer)
     694                    : applies(env, env.layer) || applies(env, Environment.DEFAULT_LAYER);
     695        }
     696
     697        private boolean applies(Environment env, String layer) {
     698            Cascade cascade = env.getCascade(layer);
    693699            return cascade != null && (not ^ cascade.containsKey(id));
    694700        }
Note: See TracChangeset for help on using the changeset viewer.