}
else if (evt.getActionCommand().equals(COPYCONS_SEQ))
{
- SequenceI cons = av.getConsensusSeq();
+ SequenceI cons = null;
+ if (aa[selectedRow].groupRef!=null)
+ {
+ cons = aa[selectedRow].groupRef.getConsensusSeq();
+ } else {
+ cons = av.getConsensusSeq();
+ }
if (cons != null)
{
copy_annotseqtoclipboard(cons);
item = new JMenuItem(OUTPUT_TEXT);
item.addActionListener(this);
pop.add(item);
- // annotation object should be typed
- if (selectedRow < aa.length && aa[selectedRow] == ap.av.consensus)
+ // TODO: annotation object should be typed for autocalculated/derived property methods
+ if (selectedRow < aa.length && aa[selectedRow].autoCalculated && aa[selectedRow].label.indexOf("Consensus")>-1)
{
pop.addSeparator();
+ // av and sequencegroup need to implement same interface for
final JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(
"Ignore Gaps In Consensus", ap.av.getIgnoreGapsConsensus());
+ final AlignmentAnnotation aaa = aa[selectedRow];
cbmi.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
+ if (aaa.groupRef!=null)
+ {
+ aaa.groupRef.setIgnoreGapsConsensus(cbmi.getState());
+ }
ap.av.setIgnoreGapsConsensus(cbmi.getState(), ap);
}
});