mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-11 14:44:15 +02:00
9136c605f4
"nan", "inf" and "-inf" parse as numbers, and IndependentTextItem:: fromXml() used them as they came for x, y and rotation. A project with such a value kept it: --resave wrote x="nan" back, and the SVG export drew the text at matrix(1,0,0,1,nan,95), which is not valid SVG. Conductors and element texts already load a non-finite position as 0. Load a non-finite x, y or rotation of a free text as 0, the same way. No file-format change: finite values load and save as before. Tests: tst_freetextnonfinite runs the binary's --resave and --export-svg on a fixture with x="nan", y="inf", x="-inf", rotation="nan" and a finite text (61.7, 61.3, 37 degrees, kept as they are). The four non-finite cases and the export check fail on master. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Beat Hangartner <beat@hangartners.ch>