From: Niki Date: Wed, 10 Apr 2019 11:56:11 +0000 (+0200) Subject: fix ui focus issue X-Git-Tag: fanfix-3.0.0~140 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=e0fa20fefa6074105e8cb55aa7de4785b90dd20c;p=fanfix.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 ffbcda3..cd98fac 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); } }