At some point several versions ago I started to notice something peculiar about the visualisation grid behaviour in codesys. My standard grid size is four points. I have snap-to-grid enabled 99% of the time.
When dragging the size of a component that is already in place (e.g. a button) from the left or top the new position snaps to grid point as expected. In other words, the result is a component that has its x and y coordinates at a multiple of 4. What has changed, is the behaviour when dragging the size from the right side or down side. Again, the new size appears to snap to the grid as you would expect. But upon closer inspection this is not the case. The new width (or height) after dragging the right edge (or lower edge) is a multiple of 4 PLUS 1.
E.g. starting with a component width of 40. After dragging the right edge one grid position to the right I would have expected the new width to be 44. It is not, it will be 45. Same if I drag a few positions further. E.g. when I would expect it to snap to a width of 60, instead it snaps to a width of 61 points.
At first sight this seems of little relevance but it messes things up visually because of z-order that comes into play when two adjacent components rather than just "touch" upon each other will instead overlap by 1 pixel. Ugly when placing buttons, for instance.
This has not always been the case and I don't know exactly at which version this changed.
Hi Anton! Unfortunately you came to the wrong spot. Please file a bug report in the CODESYS Store. This ticket system here is used for bugs on the webpage or infringement reports and such things.