Changeset 5912 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2013-04-29T02:00:39+02:00 (12 years ago)
Author:
Don-vip
Message:

fix #8638 - Presets: Allow editing of multiselect values in wrong order

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java

    r5886 r5912  
    8080import org.openstreetmap.josm.gui.util.GuiHelper;
    8181import org.openstreetmap.josm.gui.widgets.JosmComboBox;
     82import org.openstreetmap.josm.gui.widgets.JosmTextField;
    8283import org.openstreetmap.josm.io.MirroredInputStream;
    8384import org.openstreetmap.josm.tools.GBC;
     
    9192import org.openstreetmap.josm.tools.template_engine.TemplateParser;
    9293import org.xml.sax.SAXException;
    93 import org.openstreetmap.josm.gui.widgets.JosmTextField;
    9494
    9595
     
    10121012            } else {
    10131013                String s = o.toString();
    1014                 HashSet<String> parts = new HashSet<String>(Arrays.asList(s.split(delimiter)));
     1014                TreeSet<String> parts = new TreeSet<String>(Arrays.asList(s.split(delimiter)));
    10151015                ListModel lm = getModel();
    10161016                int[] intParts = new int[lm.getSize()];
     
    10251025                // value with our presets. if not, cop out; we will not offer
    10261026                // a selection list that threatens to ruin the value.
    1027                 setEnabled(s.equals(getSelectedItem()));
     1027                setEnabled(Utils.join(delimiter, parts).equals(getSelectedItem()));
    10281028            }
    10291029        }
Note: See TracChangeset for help on using the changeset viewer.