Object distortion after saving

Howdy,

I have a simple template that contains one rectangle that has a simple parameter called “RotationAngle” and it is bound to the “Angle” property of the rectangle inside the template. I have noticed a very strange behavior. If I resize the template first and then rotate the object in it, everything looks OK. Here’s an example of that:

The template has been resized so the rectangle is shorter (done by resizing the template using the arrows on the container):

Now the template has been rotated 45 degrees off vertical (through the RotationAngle paramter):

Now I have clicked “Save” and that template has modified itself!

Even changing the RotationAngle parameter back to zero shows that something has gone wrong with the template:

Is this a known bug? What might be causing this?

I wasn’t able to replicate this in Ignition 7.7.2.

I did see a ticket about this same issue a few months ago, and it turned out that it was a layout issue. IIRC, there was a mix of absolute and relative layouts, and the poor template was trying its best to render things logically and failing miserably.

Found the ticket. It involved this forum post, and the problem was that he was using the anchored layout instead of relative.

Kathy,

Thank you so much for the reply. Unfortunately, we are going to be stuck using 7.6.6 for a while (can’t just change versions for customers remotely at will). I am actually using relative layout mode for everything (the one rectangle) in the template. This isn’t an example of mixed layout modes. I am only using the relative layout mode. I don’t believe that the previous solution is going to work for me here.

Thanks.

Can you make a simple project with the template that shows the problem and upload it here?

Kathy,

Yes I can. I will post again when I have something.

Howdy,

I have exported a template with one rectangle in it. The rectangle uses relative layout mode and the “Enable Layout” parameter is unchecked (checking it causes objects to ignore the relative layout mode setting entirely). If you put this template into another template or into a window and apply the steps I have listed above, you can replicate the same bug.

I also tried putting “Enable Layout” as true and constraining the rectangle to anchored layout mode, but the bug persists!

Thanks.
Ignition_2014-09-10_1147_partial_saveBug.proj (5.81 KB)

When Enable Layout is unchecked, the whole template uses a primitive (unnamed) layout for the whole template. Unfortunately, that layout does not handle rotation well at all. When you checked Enable Layout and used Anchored positioning, unless you anchor all four sides you will also have problems with rotation.

Your best bets for rotation are either Anchored with all four sides anchored, or relative layout. If you choose relative, you can maintain or not maintain the aspect ratio – rotation looks fine either way.

Kathy,

I have followed your suggestions and here are my results:

Whenever “Enable Layout” is checked, relative layout mode does not work. I believe this is one discrete bug (separate, but in addition to the bug I am posting about). With “Enable Layout” checked, using anchored mode with all four sides anchored also produces the same bug (the one I am posting about here where saving the project causes object distortion). Really I am posting about two bugs, then:

[ul][li]- Objects becoming distorted upon saving.
[/li]
[li]- Relative mode doesn’t work when “Enable Layout” is checked.[/li][/ul]