Skip to content

Commit

Permalink
Check for "data" key in SettingsData for ComboBox
Browse files Browse the repository at this point in the history
  • Loading branch information
boldar99 committed Jul 8, 2024
1 parent 0a985c0 commit 5f1bacf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zxlive/settings_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class SettingsData(TypedDict):
id: str
label: str
type: FormInputType
data: NotRequired[Any]
data: NotRequired[dict[Any, str]]


color_scheme_data = {
Expand Down Expand Up @@ -215,6 +215,7 @@ def browse() -> None:
return widget_line

def make_combo_form_input(self, data: SettingsData) -> QComboBox:
assert "data" in data
name, _data = data["id"], data["data"]
value = self.settings.value(name, defaults[name])
widget = QComboBox()
Expand Down

0 comments on commit 5f1bacf

Please sign in to comment.