- APopupMenu popup = new APopupMenu(alignPanel, (Sequence) av
- .getAlignment().getSequenceAt(seq), links);
+ Sequence sq = (Sequence) av
+ .getAlignment().getSequenceAt(seq);
+ // build a new links menu based on the current links + any non-positional features
+ Vector nlinks = new Vector();
+ for (int l=0,lSize=links.size();l<lSize; l++)
+ {
+ nlinks.addElement(links.elementAt(l));
+ }
+ SequenceFeature sf[] = sq.getSequenceFeatures();
+ for (int sl=0;sf!=null && sl<sf.length;sl++)
+ {
+ if (sf[sl].begin==sf[sl].end && sf[sl].begin==0)
+ {
+ if (sf[sl].links!=null && sf[sl].links.size()>0)
+ {
+ for (int l=0, lSize=sf[sl].links.size(); l<lSize; l++)
+ {
+ nlinks.addElement(sf[sl].links.elementAt(l));
+ }
+ }
+ }
+ }
+
+ APopupMenu popup = new APopupMenu(alignPanel, sq, nlinks);