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 (from parent 1:
4168df7
)
JAL-2371 (slight!) simplification of isApplicableTo()
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Wed, 1 Feb 2017 13:02:56 +0000
(13:02 +0000)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Wed, 1 Feb 2017 13:02:56 +0000
(13:02 +0000)
src/jalview/schemes/ResidueColourScheme.java
patch
|
blob
|
history
diff --git
a/src/jalview/schemes/ResidueColourScheme.java
b/src/jalview/schemes/ResidueColourScheme.java
index
358417b
..
03fc129
100755
(executable)
--- a/
src/jalview/schemes/ResidueColourScheme.java
+++ b/
src/jalview/schemes/ResidueColourScheme.java
@@
-20,9
+20,9
@@
*/
package jalview.schemes;
*/
package jalview.schemes;
-import jalview.datamodel.AlignmentI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
+import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
import jalview.util.Comparison;
import jalview.datamodel.SequenceI;
import jalview.util.Comparison;
@@
-146,30
+146,26
@@
public abstract class ResidueColourScheme implements ColourSchemeI
{
return true;
}
{
return true;
}
-
- /*
- * inspect the data context (alignment) for residue type
- */
- boolean nucleotide = false;
- if (ac instanceof AlignmentI)
+ if (ac == null)
{
{
- nucleotide = ((AlignmentI) ac).isNucleotide();
+ return true;
}
}
- else
+ /*
+ * pop-up menu on selection group before group created
+ * (no alignment context)
+ */
+ // TODO: add nucleotide flag to SequenceGroup?
+ if (ac instanceof SequenceGroup && ac.getContext() == null)
{
{
- AnnotatedCollectionI context = ac.getContext();
- if (context instanceof AlignmentI)
- {
- nucleotide = ((AlignmentI) context).isNucleotide();
- }
- else
- {
- // not sure what's going on, play safe
- return true;
- }
+ return true;
}
/*
}
/*
+ * inspect the data context (alignment) for residue type
+ */
+ boolean nucleotide = ac.isNucleotide();
+
+ /*
* does data type match colour scheme type?
*/
return (nucleotide && isNucleotideSpecific())
* does data type match colour scheme type?
*/
return (nucleotide && isNucleotideSpecific())