From: Niki Date: Wed, 10 Apr 2019 11:56:11 +0000 (+0200) Subject: fix ui focus issue X-Git-Tag: fanfix-swing-0.0.1~12^2~177 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=e0fa20fefa6074105e8cb55aa7de4785b90dd20c;p=fanfix-swing.git fix ui focus issue --- diff --git a/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java b/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java index ffbcda37..cd98fac5 100644 --- a/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java +++ b/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java @@ -288,7 +288,7 @@ public class GuiReaderGroup extends JPanel { books.get(previousIndex).setSelected(false); } - if (index >= 0) { + if (index >= 0 && !books.isEmpty()) { books.get(index).setSelected(true); } }