Ignore:
Timestamp:
2011-02-12T20:30:01+01:00 (13 years ago)
Author:
bastiK
Message:

mapcss: some rework of Error Handling, (Multi)Cascade and icon loading

File:
1 edited

Legend:

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

    r3882 r3893  
    5858            System.err.println(tr("Warning: failed to parse Mappaint styles from ''{0}''. Error was: {1}", url, e.getMessage()));
    5959            e.printStackTrace();
    60             logError(e);
     60            logError(new ParseException(e.getMessage())); // allow e to be garbage collected, it links to the entire token stream
    6161        }
    6262    }
     
    124124                    }
    125125
    126                     Cascade c = mc.get(sub);
    127                     if (c == null) {
    128                         if (mc.containsKey("*")) {
    129                             c = mc.get("*").clone();
    130                         } else {
    131                             c = new Cascade(!sub.equals("default"));
    132                         }
    133                         mc.put(sub, c);
    134                     }
    135 
    136126                    if (sub.equals("*")) {
    137                         for (Entry<String, Cascade> entry : mc.entrySet()) {
     127                        for (Entry<String, Cascade> entry : mc.getLayers()) {
    138128                            env.layer = entry.getKey();
     129                            if (Utils.equal(env.layer, "*")) {
     130                                continue;
     131                            }
    139132                            for (Instruction i : r.declaration) {
    140133                                i.execute(env);
Note: See TracChangeset for help on using the changeset viewer.