mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-08 21:14:14 +02:00
6b83fdf7b3
Diagram::toXml() writes freezeNewElement and freezeNewConductor as "true"/"false", but Diagram::fromXml() read them with toInt(), which is 0 for both words. So "freeze new elements" and "freeze new conductors" were off again on every folio after a project was saved and reopened, since the day the flags were added. Compare the attribute with "true" instead. The project-level flags in QETProject already do this. No file-format change: the attributes are written exactly as before, and a file without them still loads with both flags off. Tests: tst_foliofreezeflags runs the binary's --resave on a fixture with one folio per combination (both, elements only, none, attributes missing) and reads the saved attributes back. The two frozen folios fail on master. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Beat Hangartner <beat@hangartners.ch>