mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-28 13:24:14 +02:00
b18904415e
Making the Informations tab visible for Slave elements is only half the change: ElementScene::toXml() writes the <elementInformations> block for Simple, Master, Terminal and Thumbnail, and Slave was not in that list. It is the only place in the tree that writes that block, so the editor would have shown an editable tab for a slave, accepted whatever the user typed into it, and dropped it silently on save. Visible in the shipped collection, which matches the condition exactly: 0 of 75 slave elements carry an <elementInformations> block, against 41 of 70 terminal elements. Adding Slave is safe in both directions. ElementData::fromXml() reads <elementInformations> unconditionally, with no check on the base type, so existing slave elements are unaffected and newly written ones load back correctly. It also makes populateTree()'s PLC-slave branch reachable for the first time -- the five PLC info rows it adds are stored in m_informations, so until now they could not have been saved either. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>