mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-10 22:24:13 +02:00
ee164f1bf1
A summary or parts-list table split over several folios saves its data with its first part only; each later part names the part before it. Deleting a folio keeps its tables in memory for undo, still in the chain, so saving then named the deleted part as the previous table of the next one. On reopening, every part after the gap had no data, and closing the project crashed: the first orphaned part, destroyed, handed its missing data on to the next part through a null model. toXml() now names the nearest previous part still in the project, or saves the data if there is none. setPreviousTable() no longer copies a null model, so files already saved this way open and close. Tests (tst_resaveunchanged): missingPreviousTableOpens, deletedFolioKeepsTableChain; both fail without the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Wga9B92BNurDEtxxtCDxf