progress bar hashtable entry was not being removed (bug #0059977)
authorjprocter <Jim Procter>
Wed, 10 Feb 2010 14:44:06 +0000 (14:44 +0000)
committerjprocter <Jim Procter>
Wed, 10 Feb 2010 14:44:06 +0000 (14:44 +0000)
src/jalview/gui/AlignFrame.java

index 3859157..d97b8c3 100755 (executable)
@@ -685,20 +685,21 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     }
 
     JPanel progressPanel;
+    Long lId=new Long(id);
     GridLayout layout = (GridLayout) statusPanel.getLayout();
-    if (progressBars.get(new Long(id)) != null)
+    if (progressBars.get(lId) != null)
     {
       progressPanel = (JPanel) progressBars.get(new Long(id));
       statusPanel.remove(progressPanel);
-      progressBars.remove(progressPanel);
+      progressBars.remove(lId);
       progressPanel = null;
       if (message != null)
       {
         statusBar.setText(message);
       }
-      if (progressBarHandlers.contains(new Long(id)))
+      if (progressBarHandlers.contains(lId))
       {
-        progressBarHandlers.remove(new Long(id));
+        progressBarHandlers.remove(lId);
       }
       layout.setRows(layout.getRows() - 1);
     }
@@ -715,7 +716,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       layout.setRows(layout.getRows() + 1);
       statusPanel.add(progressPanel);
 
-      progressBars.put(new Long(id), progressPanel);
+      progressBars.put(lId, progressPanel);
     }
     // update GUI
     setMenusForViewport();