Changeset 35856 in osm for applications/editors/josm


Ignore:
Timestamp:
2021-11-06T10:09:02+01:00 (3 years ago)
Author:
GerdP
Message:

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

  • update code to recent changes in core, bump version
  • also seems to fix #18897
Location:
applications/editors/josm/plugins/utilsplugin2
Files:
2 edited

Legend:

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

    r35671 r35856  
    55    <property name="commit.message" value="[josm_utilsplugin2]: select boundary by double-click; multitagger table highlights"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="17199"/>
     7    <property name="plugin.main.version" value="18173"/>
    88
    99    <property name="plugin.author" value="Kalle Lampila, Upliner, Zverik, akks, joshdoe and others"/>
  • applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTagDialog.java

    r35682 r35856  
    1919import java.util.Collection;
    2020import java.util.Collections;
    21 import java.util.LinkedList;
    2221import java.util.List;
    2322
     
    143142
    144143    private void loadHistory() {
    145         List<String> cmtHistory = new LinkedList<>(
    146                 Config.getPref().getList(HISTORY_KEY, Arrays.asList(defaultHistory)));
    147         Collections.reverse(cmtHistory);
    148         cbTagSet.setPossibleItems(cmtHistory);
    149         String s = cmtHistory.get(cmtHistory.size()-1);
     144        cbTagSet.getModel().prefs().load(HISTORY_KEY, Arrays.asList(defaultHistory));
     145        String s = cbTagSet.getModel().getElementAt(0);
    150146        cbTagSet.setText(s);
    151147        specifyTagSet(s);
     
    283279            String txt = cbTagSet.getText();
    284280            Logging.debug(txt);
    285             List<String> history = cbTagSet.getHistory();
     281            List<String> history = cbTagSet.getModel().asStringList();
    286282            history.remove(txt);
    287283            if (history.isEmpty()) {
     
    321317            oldTags = s;
    322318            cbTagSet.addCurrentItemToHistory();
    323             Config.getPref().putList(HISTORY_KEY, cbTagSet.getHistory());
     319            cbTagSet.getModel().prefs().save(HISTORY_KEY);
    324320            specifyTagSet(s);
    325321        }
Note: See TracChangeset for help on using the changeset viewer.