From 2c6b4b751ffdd1156254b31745597654b5f2e286 Mon Sep 17 00:00:00 2001 From: Christian Kolset Date: Wed, 29 Jul 2026 13:10:35 -0600 Subject: Rework channel labeling and add source picker to virtual-channel creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Relabel every channel picker/header to "NAME (DEVICE/SIGNAL)" instead of the previous "DEVICE/SIGNAL (NAME)" ordering, consistently across channels_window.py (_channel_combo, ChannelPickerDialog, ChannelPipelineBlock header), plot_builder.py, plot_config.py, control_editor.py, and plot_window.py. While touching each of those pickers, added the missing `.enabled` filter that _make_picker()/_x_cb/_build_channel_picker lacked (the default-layout builders already filtered disabled channels; these manual "add channel to pane" pickers didn't). Devices window Signals tab: removed the separate "Signal ID" column (folded into the existing non-editable Device column instead of the editable Name column, to avoid corrupting the in-place channel rename feature that column already supports). Channels window Virtual Channels pane: added a "Source" dropdown next to "+ Add Channel" — picking a source pre-seeds the new derived channel with it via DerivedBlock._add_src(); leaving it on the default "none" entry keeps today's behavior of creating an empty channel. Note: docs/ToDo.md's "Channels window UI" items referred to the *live* UI (this window's PipelineTab + the Devices window's Signals tab), not SignalsListTab in this same file, which its own module docstring flags as dead/unused code kept only for old-profile compatibility — verified by grepping for any instantiation of it (none exist). Co-Authored-By: Claude Sonnet 5 --- ui/control_editor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/control_editor.py') diff --git a/ui/control_editor.py b/ui/control_editor.py index 48de21d..65aa96e 100644 --- a/ui/control_editor.py +++ b/ui/control_editor.py @@ -362,7 +362,7 @@ class ControlEditorDialog(QDialog): return # Add actual channels for ch in dev.info.channels: - self._ch_cb.addItem(f"{ch.channel_id} ({ch.name})", + self._ch_cb.addItem(f"{ch.name} ({ch.channel_id})", userData=ch.channel_id) # For Arduino backends also suggest digital pins for output if hasattr(dev, "backend") and dev.backend == "arduino": -- cgit v1.2.3