Skip to content

Commit

Permalink
MessageListView: only request focus if size > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
pfn committed Nov 2, 2009
1 parent 365f2ea commit 0609737
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/java/com/zimbra/app/systray/MessageListView.java
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,10 @@ public void actionPerformed(ActionEvent e) {
finally {
performingAction = false;
int s = list.getModel().getSize();
list.setSelectedIndex(s > idx ? idx : s - 1);
list.requestFocusInWindow();
if (s > 0) {
list.setSelectedIndex(s > idx ? idx : s - 1);
list.requestFocusInWindow();
}
}
}
}
Expand Down

0 comments on commit 0609737

Please sign in to comment.