From: Volodymyr Poltavets Date: Thu, 17 Jun 2021 18:15:02 +0000 (+0200) Subject: * Autoselect first dictionary if none was configured previously X-Git-Tag: v0.1.0~116^2 X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=745fde4bda238dc33fa2e0fb182f564ad745759b;p=jiten-pai.git * Autoselect first dictionary if none was configured previously --- 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()