mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-03 01:04:13 +02:00
1ec4f56a50
The F2 color editor recolors one conductor, but the next one drawn falls straight back to defaultConductorProperties -- the choice made via F2 is lost the moment you place another wire, and lost again on restart. LastUsedStyle already solves the same problem for shapes (pen/brush) and free text (font), session-scoped and deliberately not QSettings-backed; this extends it with a conductor color, following the identical has/get/set shape. F2's handler records the color after pushing its undo command. Conductor's constructor -- the one place a new conductor's properties are set from defaultConductorProperties -- overrides just the color field when a session color has been recorded, leaving every other default (style, thickness, text) alone. Verified: build clean, ctest 6/6. Could not get a reliable headless GUI trace of "F2 one wire, draw a new one, see it inherit the color" -- drag-and-drop element placement under Xvfb was unreliable in this environment (one attempt did nothing, another drew an unintended long conductor undo didn't fully clear). The code path is otherwise identical to the already-shipped shape/text mechanism this mirrors. Refs #461. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>