Skip to content

Commit

Permalink
Made sure that one item in the list is always selected (bug 3272)
Browse files Browse the repository at this point in the history
  • Loading branch information
KlasJoensson committed Aug 22, 2012
1 parent dca5b3e commit cac25c5
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -434,8 +434,12 @@ private void refreshTable() {
}

private void refreshOnSelectionChanged() {
/* If there's no item selected (e.g. if the user clicked below the last
* item in the list) we'll select the last item in the list. */
if ( accountsListViewer.getList().getSelectionCount() == 0 )
return;
accountsListViewer.getList().select(accountsListViewer
.getList().getItemCount() - 1 );

String selectedAccountId =
extractAccountId( accountsListViewer.getList()
.getSelection()[0] );
Expand Down

0 comments on commit cac25c5

Please sign in to comment.