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:
48b79dd
)
Null pointer if user presses shift before anything else
author
amwaterhouse
<Andrew Waterhouse>
Tue, 20 Sep 2005 13:15:31 +0000
(13:15 +0000)
committer
amwaterhouse
<Andrew Waterhouse>
Tue, 20 Sep 2005 13:15:31 +0000
(13:15 +0000)
src/jalview/gui/UserDefinedColours.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/UserDefinedColours.java
b/src/jalview/gui/UserDefinedColours.java
index
79df106
..
ec4ad55
100755
(executable)
--- a/
src/jalview/gui/UserDefinedColours.java
+++ b/
src/jalview/gui/UserDefinedColours.java
@@
-139,8
+139,12
@@
public class UserDefinedColours extends GUserDefinedColours
\r
if(e.isShiftDown())
\r
{
\r
- JButton start = (JButton)selectedButtons.elementAt(selectedButtons.size()-1);
\r
- JButton end = (JButton) e.getSource();
\r
+ JButton start, end = (JButton) e.getSource();
\r
+ if(selectedButtons.size()>1)
\r
+ start = (JButton)selectedButtons.elementAt(selectedButtons.size()-1);
\r
+ else
\r
+ start = (JButton) e.getSource();
\r
+
\r
int startIndex=0, endIndex=0;
\r
for(int b=0; b<buttonPanel.getComponentCount(); b++)
\r
{
\r