Ignore:
Timestamp:
2008-04-18T00:59:07+02:00 (16 years ago)
Author:
framm
Message:
  • fix memory leaks described in ticket #432, patch by <Petr.Nejedly@…>
File:
1 edited

Legend:

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

    r357 r612  
    127127                eventSource.addMouseMotionListener(this);
    128128                selectionEndedListener.addPropertyChangeListener(this);
    129                 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "SelectionManager");
    130         Main.contentPane.getActionMap().put("SelectionManager", new AbstractAction(){
    131                         public void actionPerformed(ActionEvent e) {
    132                                 if (mousePos != null && mousePosStart != null)
    133                                         paintRect();
    134                                 mousePosStart = null;
    135                                 mousePos = null;
    136             }
    137         });
    138129        eventSource.addPropertyChangeListener("scale", new PropertyChangeListener(){
    139130                        public void propertyChange(PropertyChangeEvent evt) {
     
    155146                eventSource.removeMouseMotionListener(this);
    156147                selectionEndedListener.removePropertyChangeListener(this);
    157                 Main.contentPane.getInputMap().remove(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0));
    158                 Main.contentPane.getActionMap().remove("SelectionManager");
    159148        }
    160149
Note: See TracChangeset for help on using the changeset viewer.