git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba7cba0
)
JAL-2183 defensive check for openFrameCount < 0 (shouldn't happen but
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Tue, 30 Aug 2016 14:58:47 +0000
(15:58 +0100)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Tue, 30 Aug 2016 14:58:47 +0000
(15:58 +0100)
did)
src/jalview/gui/Desktop.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/Desktop.java
b/src/jalview/gui/Desktop.java
index
7811e41
..
3cc2c14
100644
(file)
--- a/
src/jalview/gui/Desktop.java
+++ b/
src/jalview/gui/Desktop.java
@@
-825,7
+825,15
@@
public class Desktop extends jalview.jbgui.GDesktop implements
javax.swing.event.InternalFrameEvent evt)
{
PaintRefresher.RemoveComponent(frame);
- openFrameCount--;
+
+ /*
+ * defensive check to prevent frames being
+ * added half off the window
+ */
+ if (openFrameCount > 0)
+ {
+ openFrameCount--;
+ }
windowMenu.remove(menuItem);
JInternalFrame itf = desktop.getSelectedFrame();
if (itf != null)