Changeset 35860 in osm


Ignore:
Timestamp:
2021-11-06T11:56:28+01:00 (3 years ago)
Author:
GerdP
Message:

see #21515: NoSuchMethodError: 'void org.openstreetmap.josm.gui.widgets.HistoryComboBox.setPossibleItems(java.util.Collection)'

  • update FastDraw code to recent changes in core, bump version
Location:
applications/editors/josm/plugins/FastDraw
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/FastDraw/build.xml

    r35256 r35860  
    44    <property name="commit.message" value="[josm_fastdraw] Fix incorrect settings saving-2"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="14960"/>
     6    <property name="plugin.main.version" value="18173"/>
    77   
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawConfigDialog.java

    r35499 r35860  
    88import java.text.NumberFormat;
    99import java.text.ParseException;
    10 import java.util.ArrayList;
    1110
    1211import javax.swing.AbstractAction;
     
    2423import org.openstreetmap.josm.gui.datatransfer.importers.TextTagPaster;
    2524import org.openstreetmap.josm.gui.widgets.HistoryComboBox;
    26 import org.openstreetmap.josm.spi.preferences.Config;
    2725import org.openstreetmap.josm.tools.GBC;
    2826import org.openstreetmap.josm.tools.ImageProvider;
     
    6967        pasteButton.setToolTipText(tr("Try copying tags from properties table"));
    7068
    71         ArrayList<String> history = new ArrayList<>(Config.getPref().getList("fastdraw.tags-history"));
    72         while (history.remove("")) { };
    73         addTags.setPossibleItems(history);
     69        addTags.getModel().prefs().load("fastdraw.tags-history");
     70        while (addTags.getModel().find("") != null)
     71            addTags.getModel().removeElement("");
    7472
    7573        all.add(label1, GBC.std().insets(10, 0, 0, 0));
     
    134132                    addTags.addCurrentItemToHistory();
    135133                }
    136                 Config.getPref().putList("fastdraw.tags-history", addTags.getHistory());
     134                addTags.getModel().prefs().save("fastdraw.tags-history");
    137135                settings.savePrefs();
    138136            } catch (ParseException e) {
Note: See TracChangeset for help on using the changeset viewer.