Update preferences

This commit is contained in:
Veronica Berglyd Olsen
2024-05-13 17:51:16 +02:00
parent e1af21bf88
commit e5e3066b3d
3 changed files with 48 additions and 32 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ class NComboBox(QComboBox):
event.ignore()
return
def setCurrentData(self, data: str | Enum, default: str | Enum) -> None:
def setCurrentData(self, data: str | int | Enum, default: str | int | Enum) -> None:
"""Set the current index from data, with a fallback."""
idx = self.findData(data)
self.setCurrentIndex(self.findData(default) if idx < 0 else idx)