Browse Source

Create the lag display panel before adding it.

It works better this way.

Change-Id: I20470a7d5c12b52798bdab9bd5f9a385d140443c
Fixes-Issue: CLIENT-441
Reviewed-on: http://gerrit.dmdirc.com/3155
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
tags/0.8
Chris Smith 10 years ago
parent
commit
c941fb857c
1 changed files with 2 additions and 5 deletions
  1. 2
    5
      src/com/dmdirc/addons/lagdisplay/LagDisplayManager.java

+ 2
- 5
src/com/dmdirc/addons/lagdisplay/LagDisplayManager.java View File

@@ -92,25 +92,22 @@ public class LagDisplayManager implements ActionListener, ConfigChangeListener,
92 92
     }
93 93
 
94 94
     public void load() {
95
+        panel = panelProvider.get();
95 96
         statusBar.addComponent(panel);
96 97
         mainFrame.addSelectionListener(this);
97
-
98 98
         globalConfig.addChangeListener(domain, this);
99 99
         readConfig();
100 100
         ActionManager.getActionManager().registerListener(this,
101 101
                 CoreActionType.SERVER_GOTPING, CoreActionType.SERVER_NOPING,
102 102
                 CoreActionType.SERVER_DISCONNECTED,
103 103
                 CoreActionType.SERVER_PINGSENT, CoreActionType.SERVER_NUMERIC);
104
-
105
-        panel = panelProvider.get();
106 104
     }
107 105
 
108 106
     public void unload() {
109
-        mainFrame.removeSelectionListener(this);
110 107
         statusBar.removeComponent(panel);
108
+        mainFrame.removeSelectionListener(this);
111 109
         globalConfig.removeListener(this);
112 110
         ActionManager.getActionManager().unregisterListener(this);
113
-
114 111
         panel = null;
115 112
     }
116 113
 

Loading…
Cancel
Save