Description
Viewport does not respond properly to setting the viewPositionX or viewPositionY.
Steps to reproduce:
Load the following snippet,
note the comment in the script,
then compile.
HiseSnippet 842.3ocsUsraSCDEclz5RSfhnHVxBqtJEUU4D5qHDhPSSgHnsQjRErpZx3qaFU6YrrmzRDBI1xJ1xmD+JvJ9CJ2w1IwkV0GQBuvZN2Gy8n6qocjhCwwpHBsz9CBAB8dVcFH08ZziIjjVaQn22ZGVrFhrSEs4fPVbL3RnzodkQ.s3zjju+7hMY9LIGFKhPNPI3vaEAB8Xosq+Fgu+1LWXeQPNqWodKtR1P4q5i7YJKGRHieL6HXWlwrBVjWyh6QnOwhyWoFrgW00cpVCV0cktUq3vp5Tq15.aUGd2Z.qpWWtCgNSSWgVE0QyzPLdoapbGzom5TYZ.NPDK55CFPERGLxohIM5I7caOL4DSHzoaONUMUZp5QV6HbEijONk8fDE1i8HeRiV3pnTkaAkn4nzzoTZdqN7HQndrFCetqUKIVA8XXsIOURskT3wTqFJzBod4.1wv1QHXjGkWywYIa72hOqTIr9DqsOP.mFphzUret8PGOBzMTAgJIBJuvHKVv30Hzxw.p7DD1VEKzBk7iKrjcEiMd8kbi.akbWkF1SVdwRetTwReoj8+pxy6R0YXRjx2GhtT0ldsnqxwxx9AcgnkrOg42GFYHlaOeAalaVAimlXxYnR1RJz6EBY3sU9tlBg47EKujrLKd58s1hoYlJdlLztPHRKLzgtEbBNikV+KZsEDerVElXaV4fPuiNQ6Cy5N.2gUDhv0zdLp.Q9z3wwV0GjGbpvUiCeVzehvdf3ndZC52TBIlcBzR1NBvxaRKd9XOaZrmaXmISB9IgcVqjyIwzhNCdOCLG9Ad8BMDLbOPwY902HmY3PHKBuwbWcdhOjQYDt92GR3LAe0qN4hyK3jpxsuOSe9wWyhsLEXKx4lYLyERr2cP9Ee2hYZmqbl9lRw4sZKz7dWNGKbIbDad9evwrMgyY0zyC35wDbZqs+vjt16ZB+6T80B4Q6vzQBSqyt8C5fcJb.itDanhMcQELCPoXGC1jA5.R2DvY3WlxJFLMSYkgJIALdj5Pd5hAyt1YSjfbRl7VTQ7QQDaWgjrrHedN.W8eHme9q5BNVcRc7oSpiqLoNt5j53ZSpiqOoNtw06n4k4W1WqBRGaHjcZ2LY6Jk1TxvNvjtUxes6W8gN
The expected result:
The viewport should initialize scrolled all the way down (value of 1).
Actual result:
The viewport seems to snap right back to viewPositionY at value 0.
David Healey has noted a possible workaround for the bug is to use a timer in the script,
and because of that I am wondering if this bug has a common root cause with .setZLevel,
as that also reverts on compile if you try setting it in the script,
but may work in some circumstances if you add a timer.
I should note that after testing the workaround, that it creates a discrepancy between the Interface Designer and the Interface Preview:

When the project is built, the Interface Preview is the version that ends up in the build.
Also, on further testing:
Using a broadcaster to link the viewYPosition of two broadcasters does not work.
The sending value looks like it changes properly, but the broadcaster and receiver values are both wrong (and different from each other):


HISE 4.0
macOS Sonoma 14.5