Changeset 1777 in josm


Ignore:
Timestamp:
2009-07-12T14:38:43+02:00 (15 years ago)
Author:
stoecker
Message:

fixed style selection box

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/MapPaintPreference.java

    r1743 r1777  
    3737        styleCombo.addItem("standard");
    3838
     39        sources = new StyleSources("mappaint.style.sources", "mappaint.icon.sources",
     40        "http://josm.openstreetmap.de/styles", false, tr("Map Paint Styles"));
     41
    3942        String style = Main.pref.get("mappaint.style", "standard");
     43        if(!style.equals("standard"))
     44            styleCombo.addItem(style);
     45
    4046        styleCombo.setEditable(true);
    4147        for (int i = 0; i < styleCombo.getItemCount(); ++i) {
    42             if (styleCombo.getItemAt(i).getClass().getName().equals(style)) {
     48            if (((String)styleCombo.getItemAt(i)).equals(style)) {
    4349                styleCombo.setSelectedIndex(i);
    4450                break;
     
    5662        panel.add(styleCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0,0,5,0));
    5763
    58         sources = new StyleSources("mappaint.style.sources", "mappaint.icon.sources",
    59         "http://josm.openstreetmap.de/styles", false, tr("Map Paint Styles"));
    6064        panel.add(sources, GBC.eol().fill(GBC.BOTH));
    6165        gui.mapcontent.addTab(tr("Map Paint Styles"), scrollpane);
Note: See TracChangeset for help on using the changeset viewer.