Changeset 10782 in josm


Ignore:
Timestamp:
2016-08-11T15:38:15+02:00 (3 years ago)
Author:
simon04
Message:

fix #13317 - pressing enter in wizard box should create the overpass query

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/OverpassDownloadAction.java

    r10629 r10782  
    4848import org.openstreetmap.josm.io.OverpassDownloadReader;
    4949import org.openstreetmap.josm.tools.GBC;
     50import org.openstreetmap.josm.tools.InputMapUtils;
    5051import org.openstreetmap.josm.tools.OverpassTurboQueryWizard;
    5152import org.openstreetmap.josm.tools.Shortcut;
     
    155156            overpassWizard.getEditorComponent().addFocusListener(disableActionsFocusListener);
    156157            final JButton buildQuery = new JButton(tr("Build query"));
    157             buildQuery.addActionListener(new AbstractAction() {
     158            final Action buildQueryAction = new AbstractAction() {
    158159                @Override
    159160                public void actionPerformed(ActionEvent e) {
     
    173174                    }
    174175                }
    175             });
     176            };
     177            buildQuery.addActionListener(buildQueryAction);
    176178            buildQuery.setToolTipText(tooltip);
    177179            pnl.add(buildQuery, GBC.std().insets(5, 5, 5, 5));
    178180            pnl.add(overpassWizard, GBC.eol().fill(GBC.HORIZONTAL));
     181            InputMapUtils.addEnterAction(overpassWizard.getEditorComponent(), buildQueryAction);
    179182
    180183            overpassQuery = new JosmTextArea("", 8, 80);
Note: See TracChangeset for help on using the changeset viewer.