Ignore:
Timestamp:
2011-05-05T20:49:14+02:00 (13 years ago)
Author:
bastiK
Message:

mapcss: performance improvement for parent selector (by Gubaer)

File:
1 edited

Legend:

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

    r4069 r4074  
    134134                if ((s instanceof GeneralSelector)) {
    135135                    GeneralSelector gs = (GeneralSelector) s;
    136                     if (gs.base.equals(type)) {
    137                         for (Condition cnd : gs.conds) {
    138                             if (!cnd.applies(env))
    139                                 continue NEXT_RULE;
     136                    if (gs.getBase().equals(type)) {
     137                        if (!gs.matchesConditions(env)) {
     138                            continue NEXT_RULE;
    140139                        }
    141                         for (Instruction i : r.declaration) {
    142                             i.execute(env);
    143                         }
     140                        r.execute(env);
    144141                    }
    145142                }
     
    179176                                continue;
    180177                            }
    181                             for (Instruction i : r.declaration) {
    182                                 i.execute(env);
    183                             }
     178                            r.execute(env);
    184179                        }
    185180                    }
    186181                    env.layer = sub;
    187                     for (Instruction i : r.declaration) {
    188                         i.execute(env);
    189                     }
     182                    r.execute(env);
    190183                }
    191184            }
Note: See TracChangeset for help on using the changeset viewer.