Ignore:
Timestamp:
2009-05-07T20:00:43+02:00 (15 years ago)
Author:
stoecker
Message:

close #2535 - patch by podolsir - NPE for missing icon, update translations, added et, nb, gl

File:
1 edited

Legend:

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

    r1340 r1583  
    22
    33import java.awt.Color;
     4
     5import javax.swing.ImageIcon;
    46
    57import org.openstreetmap.josm.tools.ColorHelper;
     
    170172            else if (qName.equals("icon"))
    171173            {
    172                 hadIcon = inIcon = true;
     174                inIcon = true;
    173175                for (int count=0; count<atts.getLength(); count++)
    174176                {
    175                     if (atts.getQName(count).equals("src"))
    176                         rule.icon.icon = MapPaintStyles.getIcon(atts.getValue(count), styleName);
    177                     else if (atts.getQName(count).equals("annotate"))
     177                    if (atts.getQName(count).equals("src")) {
     178                        ImageIcon icon = MapPaintStyles.getIcon(atts.getValue(count), styleName);
     179                        hadIcon = (icon != null);
     180                        rule.icon.icon = icon;
     181                    } else if (atts.getQName(count).equals("annotate"))
    178182                        rule.icon.annotate = Boolean.parseBoolean (atts.getValue(count));
    179183                    else if(atts.getQName(count).equals("priority"))
Note: See TracChangeset for help on using the changeset viewer.