Details
Description
ColumnSelection.getSelection() returns the selected columns in the order added rather than left-to-right order.
Looking at callers:
- mostly they just do 'something' to everything in the returned list, which is ok regardless of ordering
AlignViewController.makeGroupsFromSelection() is affected:
- drag right-to-left to make a selection - the subsequence generated is in reverse order
Default for 'Label' when editing an annotation row is affected:
- create some annotation with labels: A,B
- drag right-to-left to select these
- right-click 'Label' - the default is BA rather than AB
[though questionable why the code then writes the default value into _each_ annotation position rather than across the selected range]
You can also see this by making sparse column selections, from right to left in the alignment.
NB this is not currently possible in develop - see http://issues.jalview.org/browse/JAL-2077?focusedCommentId=15834&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15834
Suggestion: recode ColumnSelection.getSelected() to return an ordered list, or perhaps remove it in favour of getSelectedRanges().
Looking at callers:
- mostly they just do 'something' to everything in the returned list, which is ok regardless of ordering
AlignViewController.makeGroupsFromSelection() is affected:
- drag right-to-left to make a selection - the subsequence generated is in reverse order
Default for 'Label' when editing an annotation row is affected:
- create some annotation with labels: A,B
- drag right-to-left to select these
- right-click 'Label' - the default is BA rather than AB
[though questionable why the code then writes the default value into _each_ annotation position rather than across the selected range]
You can also see this by making sparse column selections, from right to left in the alignment.
NB this is not currently possible in develop - see http://issues.jalview.org/browse/JAL-2077?focusedCommentId=15834&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15834
Suggestion: recode ColumnSelection.getSelected() to return an ordered list, or perhaps remove it in favour of getSelectedRanges().