mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-27 12:34:14 +02:00
ea1f65107e
Conductor::moveSegment(index, dx, dy) is the same primitive handlerMouseMoveEvent()/handlerMouseReleaseEvent() apply on a drag -- move both axes on the target segment (each of ConductorSegment's moveX()/moveY() silently no-ops on the wrong axis or a static, terminal-anchored segment), recompute the path, and push one ChangeConductorCommand undo step via the existing saveProfile(). Caught while writing the first test for it: moveSegment() never set modified_path, so Conductor::toXml() skipped writing <segment> children and a manually rerouted conductor silently reverted to auto-routing on the very next save -- the change took effect in the running scene but never reached disk. Fixed by setting the flag, the same as every other path-modifying call site already does. qet.conductorSegments() lists a conductor's segments (endpoints in scene coordinates, orientation, static/movable) so a script can find the index it wants; qet.moveConductorSegment() applies the move and refuses a static segment or an out-of-range index. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>