Skip to content
Snippets Groups Projects
Commit e71401fe authored by David Hammer's avatar David Hammer
Browse files

Scene generation: use combo box for keys with options

parent 9e192a9a
No related branches found
No related tags found
1 merge request!12Snapshot: field test deployed version as of end of run 202201
......@@ -4,6 +4,7 @@ import karathon
from karabo.common.scenemodel.api import (
CheckBoxModel,
ColorBoolModel,
ComboBoxModel,
DeviceSceneLinkModel,
DetectorGraphModel,
DisplayCommandModel,
......@@ -257,7 +258,16 @@ class MaybeEditableRow(HorizontalLayout):
if "valueType" not in key_attr:
return
value_type = key_attr["valueType"]
if value_type in _type_to_line_editable:
if "options" in key_attr:
self.children.append(
ComboBoxModel(
keys=[f"{device_id}.{key_path}"],
width=edit_width,
height=height,
klass="EditableComboBox",
)
)
elif value_type in _type_to_line_editable:
line_editable_class, extra_args = _type_to_line_editable[value_type]
self.children.append(
line_editable_class(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment