Ignore:
Timestamp:
17.01.2010 16:37:24 (2 years ago)
Author:
jttt
Message:

Partially fix situation after last layer removal - most objects still stay in memory but at least there are less references and forgotten listeners

File:
1 edited

Legend:

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

    r2005 r2871  
    1010import javax.swing.JToggleButton; 
    1111 
     12import org.openstreetmap.josm.tools.Destroyable; 
     13 
    1214/** 
    1315 * Just a toggle button, with smaller border and icon only to display in 
     
    1618 * @author imi 
    1719 */ 
    18 public class IconToggleButton extends JToggleButton implements PropertyChangeListener { 
     20public class IconToggleButton extends JToggleButton implements PropertyChangeListener, Destroyable { 
    1921 
    2022    public boolean groupbutton; 
     
    4951        } 
    5052    } 
     53 
     54    public void destroy() { 
     55        Action action = getAction(); 
     56        if (action instanceof Destroyable) { 
     57            ((Destroyable) action).destroy(); 
     58        } 
     59    } 
    5160} 
Note: See TracChangeset for help on using the changeset viewer.