Items shift on save

Issue #1 closed
Siddharth Shekar repo owner created an issue

Items that are rotated or reflected during a move operation do not stay at their location when the save routine is called. Their pos() is not being set correctly.

Steps to reproduce: 1. Create new schematic 2. Create a resistor symbol 3. Create a copy of the resistor symbol and reflect it before placing it 4. Save the schematic

Intended result: Copy of the resistor stays in the location where it was placed

Actual result: The resistor gets shifted by an amount (exact value to be determined).

Comments (3)

  1. Siddharth Shekar reporter

    Problem isn't just limited to copying items. Any items that are rotated or reflected while being moved exhibit the same issue.

  2. Siddharth Shekar reporter

    The issue was caused due to the use of scenePos() instead of pos() while saving the item's origin. Upon being rotated etc, the item's pos would change correctly. scenePos, however, is calculated from the item's bounding box, which does not undergo the same transformations as the item itself. Fixed on both master and develop.

  3. Log in to comment