From 745fde4bda238dc33fa2e0fb182f564ad745759b Mon Sep 17 00:00:00 2001 From: Volodymyr Poltavets Date: Thu, 17 Jun 2021 20:15:02 +0200 Subject: [PATCH] * Autoselect first dictionary if none was configured previously --- jiten-pai.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jiten-pai.py b/jiten-pai.py index 56de2b9..258d0e4 100755 --- a/jiten-pai.py +++ b/jiten-pai.py @@ -1005,7 +1005,7 @@ class jpMainWindow(QMainWindow): self.genopt_dictsel.clear() for d in cfg['dicts']: self.genopt_dictsel.addItem(d[0], d[1]) - if idx >= self.genopt_dictsel.count(): + if idx >= self.genopt_dictsel.count() or idx < 0: idx = 0 self.genopt_dictsel.setCurrentIndex(idx) self.search() -- 2.30.2