Changeset 5672 in josm


Ignore:
Timestamp:
2013-01-26T17:42:51+01:00 (9 years ago)
Author:
Don-vip
Message:

fix #3596 - Validator list conflicts with keyboard shortcuts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java

    r4023 r5672  
    22package org.openstreetmap.josm.gui.dialogs.validator;
    33
     4import java.awt.event.KeyListener;
    45import java.awt.event.MouseEvent;
    56import java.util.ArrayList;
     
    1112import java.util.List;
    1213import java.util.Map;
     14import java.util.Map.Entry;
    1315import java.util.Set;
    14 import java.util.Map.Entry;
    1516
    1617import javax.swing.JTree;
     
    2122import javax.swing.tree.TreeSelectionModel;
    2223
     24import org.openstreetmap.josm.Main;
    2325import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2426import org.openstreetmap.josm.data.validation.Severity;
     
    2729import org.openstreetmap.josm.gui.preferences.ValidatorPreference;
    2830import org.openstreetmap.josm.tools.MultiMap;
    29 import org.openstreetmap.josm.Main;
    3031
    3132/**
     
    7071        this.getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
    7172        setErrorList(errors);
     73        for (KeyListener keyListener : getKeyListeners()) {
     74            // Fix #3596 - Remove default keyListener to avoid conflicts with JOSM commands
     75            if (keyListener.getClass().getName().equals("javax.swing.plaf.basic.BasicTreeUI$Handler")) {
     76                removeKeyListener(keyListener);
     77            }
     78        }
    7279    }
    7380
Note: See TracChangeset for help on using the changeset viewer.