mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-28 13:24:14 +02:00
a9ad6e2f34
Elements, conductors, terminals and tables already carry a uuid. The drawing furniture beside them did not, so a script or the MCP server could only name a line, a box or a note by its index in a position-sorted list, which shifts whenever one is added or removed. - QetShapeItem, IndependentTextItem and DiagramImageItem get uuid(), newUuid() and setUuid(), read from and written to a "uuid" attribute. - A folio loaded from a file written before this (or carrying a duplicate uuid) derives one from the folio uuid, the item kind and its order in the file, so the same file gives the same uuids on every load and a re-save is stable -- the #754 lesson for conductors. - Paste and folio duplication renew them, as they already do for elements and conductors. - Scripting: texts(), shapes() and images() end each line with the uuid; textIndex(), shapeIndex() and imageIndex() turn one back into an index. - misc/qet-mcp: qet_diff keys texts, shapes and images on uuid when both sides have one, so a move or edit reads as a change to that item. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>