Changeset 30592 in osm for applications/editors/josm


Ignore:
Timestamp:
2014-08-16T03:17:22+02:00 (11 years ago)
Author:
donvip
Message:

[josm_tagging-preset-tester] fix #josm9645 - Malfunction in Tagging Preset Tester main dialog

Location:
applications/editors/josm/plugins/tagging-preset-tester
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/tagging-preset-tester/build.xml

    r30541 r30592  
    22<project name="tagging-preset-tester" default="dist" basedir=".">
    33    <property name="commit.message" value="[josm_tagging_preset_tester] #josm10288: fix NPE when starting without map"/>
    4     <property name="plugin.main.version" value="7001"/>
     4    <property name="plugin.main.version" value="7412"/>
    55    <property name="josm" location="../../core/dist/josm-custom.jar"/>
    66    <property name="plugin.dist.dir" value="../../dist"/>
  • applications/editors/josm/plugins/tagging-preset-tester/src/org/openstreetmap/josm/plugins/taggingpresettester/TaggingPresetTester.java

    r30590 r30592  
    1717import javax.swing.JFrame;
    1818import javax.swing.JPanel;
     19import javax.swing.event.ListSelectionEvent;
     20import javax.swing.event.ListSelectionListener;
    1921
    2022import org.openstreetmap.josm.Main;
     
    7779        panel.add(taggingPresets, GBC.std(0,0).fill(GBC.BOTH).weight(0.5, 1.0));
    7880        panel.add(taggingPresetPanel, GBC.std(1,0).fill(GBC.BOTH).weight(0.5, 1.0));
    79         taggingPresets.addSelectionListener(new ActionListener(){
     81        taggingPresets.addSelectionListener(new ListSelectionListener(){
    8082            @Override
    81             public void actionPerformed(ActionEvent e) {
    82                 if (taggingPresets.getSelectedPreset()!=null)
     83            public void valueChanged(ListSelectionEvent e) {
     84                if (!e.getValueIsAdjusting() && taggingPresets.getSelectedPreset() != null) {
    8385                    reselect();
     86                }
    8487            }
    8588        });
Note: See TracChangeset for help on using the changeset viewer.