* Autoselect first dictionary if none was configured previously
authorVolodymyr Poltavets <Volodymyr.Poltavets@feig.de>
Thu, 17 Jun 2021 18:15:02 +0000 (20:15 +0200)
committerVolodymyr Poltavets <Volodymyr.Poltavets@feig.de>
Thu, 17 Jun 2021 18:15:02 +0000 (20:15 +0200)
jiten-pai.py

index 56de2b90781777794413e809ee000740d791f3e1..258d0e45edd70813a2d4038ea9418210ab4ba9c3 100755 (executable)
@@ -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()