git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-2137 prevent NPE when inFile is null. Not sure this is correct ?
[jalview.git]
/
src
/
jalview
/
gui
/
AlignFrame.java
diff --git
a/src/jalview/gui/AlignFrame.java
b/src/jalview/gui/AlignFrame.java
index
7ab8311
..
133aab4
100644
(file)
--- a/
src/jalview/gui/AlignFrame.java
+++ b/
src/jalview/gui/AlignFrame.java
@@
-473,7
+473,7
@@
public class AlignFrame extends GAlignFrame implements DropTargetListener,
@Override
public void focusGained(FocusEvent e)
{
@Override
public void focusGained(FocusEvent e)
{
- Desktop.setCurrentAlignFrame(AlignFrame.this);
+ Jalview.setCurrentAlignFrame(AlignFrame.this);
}
});
}
});
@@
-5960,8
+5960,13
@@
public class AlignFrame extends GAlignFrame implements DropTargetListener,
protected void setAnnotationsVisibility(boolean visible,
boolean forSequences, boolean forAlignment)
{
protected void setAnnotationsVisibility(boolean visible,
boolean forSequences, boolean forAlignment)
{
- for (AlignmentAnnotation aa : alignPanel.getAlignment()
- .getAlignmentAnnotation())
+ AlignmentAnnotation[] anns = alignPanel.getAlignment()
+ .getAlignmentAnnotation();
+ if (anns == null)
+ {
+ return;
+ }
+ for (AlignmentAnnotation aa : anns)
{
/*
* don't display non-positional annotations on an alignment
{
/*
* don't display non-positional annotations on an alignment
@@
-6098,7
+6103,7
@@
public class AlignFrame extends GAlignFrame implements DropTargetListener,
@Override
protected void runGroovy_actionPerformed()
{
@Override
protected void runGroovy_actionPerformed()
{
- Desktop.setCurrentAlignFrame(this);
+ Jalview.setCurrentAlignFrame(this);
groovy.ui.Console console = Desktop.getGroovyConsole();
if (console != null)
{
groovy.ui.Console console = Desktop.getGroovyConsole();
if (console != null)
{