Changeset 35860 in osm for applications/editors/josm
- Timestamp:
- 2021-11-06T11:56:28+01:00 (3 years ago)
- Location:
- applications/editors/josm/plugins/FastDraw
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/FastDraw/build.xml
r35256 r35860 4 4 <property name="commit.message" value="[josm_fastdraw] Fix incorrect settings saving-2"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="1 4960"/>6 <property name="plugin.main.version" value="18173"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawConfigDialog.java
r35499 r35860 8 8 import java.text.NumberFormat; 9 9 import java.text.ParseException; 10 import java.util.ArrayList;11 10 12 11 import javax.swing.AbstractAction; … … 24 23 import org.openstreetmap.josm.gui.datatransfer.importers.TextTagPaster; 25 24 import org.openstreetmap.josm.gui.widgets.HistoryComboBox; 26 import org.openstreetmap.josm.spi.preferences.Config;27 25 import org.openstreetmap.josm.tools.GBC; 28 26 import org.openstreetmap.josm.tools.ImageProvider; … … 69 67 pasteButton.setToolTipText(tr("Try copying tags from properties table")); 70 68 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(""); 74 72 75 73 all.add(label1, GBC.std().insets(10, 0, 0, 0)); … … 134 132 addTags.addCurrentItemToHistory(); 135 133 } 136 Config.getPref().putList("fastdraw.tags-history", addTags.getHistory());134 addTags.getModel().prefs().save("fastdraw.tags-history"); 137 135 settings.savePrefs(); 138 136 } catch (ParseException e) {
Note:
See TracChangeset
for help on using the changeset viewer.