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/dialogs/HistoryDialog.java

    r2710 r2871  
    6464    protected ShowHistoryAction showHistoryAction; 
    6565    protected ReloadAction reloadAction; 
     66 
     67    public HistoryDialog() { 
     68        super(tr("History"), "history", tr("Display the history of all selected items."), 
     69                Shortcut.registerShortcut("subwindow:history", tr("Toggle: {0}", tr("History")), KeyEvent.VK_H, 
     70                        Shortcut.GROUP_LAYER, Shortcut.SHIFT_DEFAULT), 150); 
     71        build(); 
     72        DataSet.selListeners.add(model); 
     73    } 
    6674 
    6775    /** 
     
    128136    } 
    129137 
    130     public HistoryDialog() { 
    131         super(tr("History"), "history", tr("Display the history of all selected items."), 
    132                 Shortcut.registerShortcut("subwindow:history", tr("Toggle: {0}", tr("History")), KeyEvent.VK_H, 
    133                         Shortcut.GROUP_LAYER, Shortcut.SHIFT_DEFAULT), 150); 
    134         build(); 
    135         DataSet.selListeners.add(model); 
     138    @Override 
     139    public void showNotify() { 
    136140        HistoryDataSet.getInstance().addHistoryDataSetListener(this); 
     141    } 
     142 
     143    @Override 
     144    public void hideNotify() { 
     145        HistoryDataSet.getInstance().removeHistoryDataSetListener(this); 
    137146    } 
    138147 
Note: See TracChangeset for help on using the changeset viewer.