mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-13 10:04:13 +02:00
6b9cb0a220
ElementInfoWidget's fixed ~40 predefined ELMT_* keys had no way for a user to add a genuinely new element-info key, even though DiagramContext already stores/round-trips arbitrary keys generically via toXml()/fromXml(). Adds an "Ajouter une propriété personnalisée" button that appends a CustomElementInfoPartWidget row (both key and value user-editable, unlike the fixed ElementInfoPartWidget rows bound to one predefined key). The typed key is validated live against the existing DiagramContext::isKeyAcceptable() and flagged with a red border when it doesn't match, instead of silently dropping it. Any key already present on the element that isn't one of the predefined/special keys is re-displayed as a custom row on next selection. Implements the scope proposed in discussion #611.