Changeset 7618 in josm for trunk/src


Ignore:
Timestamp:
2014-10-14T00:25:24+02:00 (5 years ago)
Author:
Don-vip
Message:

fix #10633 - fix disabled shortcuts after focusing relation filter, command line field, etc. Regression from r7539 + r7505

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/widgets/DisableShortcutsOnFocusGainedTextField.java

    r7539 r7618  
    33
    44import java.awt.event.FocusEvent;
    5 import java.awt.event.FocusListener;
    65import java.awt.event.KeyEvent;
    76import java.util.ArrayList;
     
    2726 * @since 5696
    2827 */
    29 public class DisableShortcutsOnFocusGainedTextField extends JosmTextField implements FocusListener {
     28public class DisableShortcutsOnFocusGainedTextField extends JosmTextField {
    3029
    3130    /**
     
    3534     */
    3635    public DisableShortcutsOnFocusGainedTextField() {
    37         init();
    3836    }
    3937
     
    4745    public DisableShortcutsOnFocusGainedTextField(String text) {
    4846        super(text);
    49         init();
    5047    }
    5148
     
    6360    public DisableShortcutsOnFocusGainedTextField(int columns) {
    6461        super(columns);
    65         init();
    6662    }
    6763
     
    7874    public DisableShortcutsOnFocusGainedTextField(String text, int columns) {
    7975        super(text, columns);
    80         init();
    8176    }
    8277
     
    9994    public DisableShortcutsOnFocusGainedTextField(Document doc, String text, int columns) {
    10095        super(doc, text, columns);
    101         init();
    10296    }
    10397
     
    10599    private final Set<JosmAction> disabledMenuActions = new HashSet<>();
    106100
    107     protected final void init() {
    108         addFocusListener(this);
    109     }
    110 
    111101    @Override
    112102    public void focusGained(FocusEvent e) {
     103        super.focusGained(e);
    113104        disableMenuActions();
    114105        unregisterActionShortcuts();
     
    118109    @Override
    119110    public void focusLost(FocusEvent e) {
     111        super.focusLost(e);
    120112        Main.map.keyDetector.setEnabled(true);
    121113        restoreActionShortcuts();
Note: See TracChangeset for help on using the changeset viewer.