Changeset 7277 in josm for trunk/src


Ignore:
Timestamp:
2014-06-30T11:59:11+02:00 (6 years ago)
Author:
bastiK
Message:

fixed #10210 - Bug combining multiple media queries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj

    r7166 r7277  
    140140|   < LPAR: "(" >
    141141|   < RPAR: ")" >
     142|   < COMMA: "," >
    142143|   < COLON: ":" >
    143144}
     
    169170|   < DCOLON: "::" >
    170171|   < SEMICOLON: ";" >
    171 |   < COMMA: "," >
    172172|   < PIPE: "|" >
    173173|   < PIPE_Z: "|z" >
     
    243243{
    244244    (
    245         (t=<PP_AND> | t=<PP_NOT> | t=<UINT> | t=<STRING> | t=<REGEX> | t=<LPAR> | t=<RPAR> | t=<COLON> | t=<IDENT> | t=<PP_SOMETHING_ELSE>) { if (write) sb.append(t.image); }
     245        (t=<PP_AND> | t=<PP_NOT> | t=<UINT> | t=<STRING> | t=<REGEX> | t=<LPAR> | t=<RPAR> | t=<COMMA> | t=<COLON> | t=<IDENT> | t=<PP_SOMETHING_ELSE>) { if (write) sb.append(t.image); }
    246246        |
    247247            pp_w1()
    248248        |
    249             pp_media()
     249            pp_media(!write)
    250250        |
    251251            t=<LBRACE> { if (write) sb.append(t.image); } pp_black_box(write) t=<RBRACE> { if (write) sb.append(t.image); }
     
    253253}
    254254
    255 void pp_media():
     255void pp_media(boolean ignore):
    256256{
    257257    boolean pass = false;
     
    265265    )?
    266266    <LBRACE>
    267     pp_black_box(empty || pass)
     267    pp_black_box((empty || pass) && !ignore)
    268268    <RBRACE>
    269269}
Note: See TracChangeset for help on using the changeset viewer.