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
Removed to reduce jar size
[jalview.git]
/
src
/
jalview
/
gui
/
UserDefinedColours.java
diff --git
a/src/jalview/gui/UserDefinedColours.java
b/src/jalview/gui/UserDefinedColours.java
index
2182b2c
..
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
\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
int startIndex=0, endIndex=0;
\r
for(int b=0; b<buttonPanel.getComponentCount(); b++)
\r
{
\r
@@
-551,7
+555,11
@@
public class UserDefinedColours extends GUserDefinedColours
}
\r
if (!files.equals(coloursFound.toString()))
\r
{
\r
}
\r
if (!files.equals(coloursFound.toString()))
\r
{
\r
- jalview.bin.Cache.setProperty("USER_DEFINED_COLOURS", coloursFound.toString());
\r
+ if (coloursFound.toString().length() > 1)
\r
+ jalview.bin.Cache.setProperty("USER_DEFINED_COLOURS",
\r
+ coloursFound.toString());
\r
+ else
\r
+ jalview.bin.Cache.applicationProperties.remove("USER_DEFINED_COLOURS");
\r
}
\r
}
\r
\r
}
\r
}
\r
\r
@@
-587,7
+595,10
@@
public class UserDefinedColours extends GUserDefinedColours
}
\r
}
\r
\r
}
\r
}
\r
\r
- jalview.bin.Cache.setProperty("USER_DEFINED_COLOURS", coloursFound.toString());
\r
+ if (coloursFound.toString().length() > 1)
\r
+ jalview.bin.Cache.setProperty("USER_DEFINED_COLOURS", coloursFound.toString());
\r
+ else
\r
+ jalview.bin.Cache.applicationProperties.remove("USER_DEFINED_COLOURS");
\r
\r
}
\r
}
\r
\r
}
\r
}
\r