Update preferences

This commit is contained in:
Veronica Berglyd Olsen committed 2024-05-13 17:51:16 +02:00
1 parent e1af21bf88
commit e5e3066b3d
3 files changed
+48 -32

No files matched your search

+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)