mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-28 13:24:14 +02:00
2efce1752d
Fix macro elements jumping to upper-left corner instead of being placed at the correct drop position. Root cause: The preview offset used itemsBoundingRect() (all items including children), while Diagram::fromXml() computed its translation offset from top-level items only. This mismatch caused fromXml to translate elements to the wrong position. Changes: - Compute top-level-only bounding rect in dummy diagram constructor to get the correct m_items_top_left reference point - Pass final_pos + m_items_top_left to fromXml() so the internal translation yields the intended final position - Add braces around single-statement for-loop in fromXml - Remove empty else block leftovers from debug cleanup