From 6aa6cea3ac9521b262af6465c0a399e08f7c6af6 Mon Sep 17 00:00:00 2001 From: Agustin <76200509+agarciacif@users.noreply.github.com> Date: Thu, 21 Aug 2025 22:15:15 +0200 Subject: [PATCH] Fix index error in SettingsEditor combo box initialization Ensures self.values[i] does not exceed the length of textList before setting the combo box value, preventing IndexError during initialization. --- pwaateditor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pwaateditor.py b/pwaateditor.py index 8c7891e..ce5c050 100644 --- a/pwaateditor.py +++ b/pwaateditor.py @@ -377,6 +377,8 @@ def createWindow(self, window, tab): textList = self.textList[i] comboBox = Combobox(frame, values=textList, state=state) + if self.values[i] >= len(textList): + self.values[i] = 0 comboBox.set(textList[self.values[i]]) comboBox.grid(row=(y*2)+1, column=x, padx=padx) self.comboBoxes.append(comboBox)