Lighting as a macropad subcommand; knobless pads start in the flat view

Running the backend module directly made runpy warn, since the package
had already imported it. The lighting commands now sit with doctor, state
and write. A pad without knobs lies flat on the desk, so it is drawn flat
unless an orientation has been chosen.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 19:26:46 +02:00
parent 80c6a5da1c
commit 021f9f7fa1
4 changed files with 58 additions and 64 deletions

View File

@@ -1227,6 +1227,11 @@ class Window(QMainWindow):
self.desired.clear()
self.pending_actions.clear()
self.pad.set_layout(self.state.layout) # drops a stale selection
# The upright view suits a pad that stands on its edge, which the
# knob pads do. A knobless pad lies flat, so draw it that way until
# the owner says otherwise.
if not self.state.layout.knobs and self.settings.value("orientation") is None:
self.pad.set_orientation("flat")
return True
# ------------------------------------------------------------- write