Rectangle size property and corner radius bug?

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
2 posts • Page 1 of 1
RJM1987
Posts:11
Joined: Mon Feb 24, 2020 5:06 am

Rectangle size property and corner radius bug?

Post by RJM1987 »

In Wincc OA v3.17 P002:

There's an apparent bug in the rectangle "size" property stored in the panel file - all of the other properties seem to correctly update in the source code of the panel file when the rectangle's properties are changed in the GEDI, but the "size" property doesn't - instead, it's set to whatever the initial size of the rectangle was and ignores any subsequent changes to the size.

I have no idea how the updated rectangle size is remembered as it appears correct on the GEDI, but regardless, this bug results in strange behaviour when setting the corner radius property.

Observe a demo at https://imgur.com/a/AJVDLS4 of two seemingly identical rectangles, but when the same corner radius is applied to both of them, the result is different!

The only difference is that the rectangle on the right (RECTANGLE4) was initially drawn on the canvas to be of size [201,21], then had its size changed to [181,471], whilst the rectangle on the left (RECTANGLE3) was initially drawn on the canvas with a size of [181,471].

This may seem minor but it's causing us headaches when trying to achieve consistent rounded corners in our UI :cry:

RJM1987
Posts:11
Joined: Mon Feb 24, 2020 5:06 am

Re: Rectangle size property and corner radius bug?

Post by RJM1987 »

Ok so after digging into this problem, it appears there is a way to get the corner radius working correctly on resized rectangles, which is to set the rectangle's Transformable property to FALSE instead of TRUE (the default).

There's a single mention of it buried in the documentation:
The property of the rectangle allows to define if rounded corners of the object transform ("transformable": TRUE; default) according to the objects transformation (Increase/decrease size, stretch object, etc.) or if they remain in there current form ("transformable": FALSE).
I have no idea why that's the case, but the default behaviour is very counter-intuitive - anyway, hope this helps others who came across the same problem :)

2 posts • Page 1 of 1