mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-29 14:14:15 +02:00
2ea279cc2b
updateConductorPath() fits a stored profile to the new terminal positions by sharing the horizontal difference over the profile's horizontal segments and the vertical one over its vertical segments. When a profile has no segment of non-zero length along an axis, the difference along that axis was dropped and the last point joined the terminal diagonally. On save that diagonal was written as one axis-aligned segment, so on reopen pathFromXml() found the lengths incoherent and rerouted the wire. Every straight wire with a stored path hits this after a reload, as a zero-length segment is saved as horizontal. Moving one end at a right angle to the wire, in the direction that keeps its path type, showed it. Generate a new path in that case, as is already done when there is no profile for the path type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>