After 4.8.15 update all cAlgo.API.Line controls are not being updated after coordinate change while other are as expected

Created at 18 Jul 2023, 22:33
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
TO

tomas.malukas.work

Joined 14.07.2023

After 4.8.15 update all cAlgo.API.Line controls are not being updated after coordinate change while other are as expected
18 Jul 2023, 22:33


Hi Team,

After 4.8.15 update all cAlgo.API.Line controls are not being updated after coordinate change while other are as expected..
Here is example-test where this is clearly visible, please fix the issue. Source code also attached below.

Thanks.

using cAlgo.API;

namespace cAlgo.Robots
{
    [Robot(AccessRights = AccessRights.FullAccess)]
    public class TESTS : Robot
    {
        protected override void OnStart()
        {
#if DEBUG
            Debugger.Launch();
#endif
            line.X2 = Chart.Width;

            Chart.AddControl(canvasMain);
            canvasMain.AddChild(btn);
            canvasMain.AddChild(tbtn);
            canvasMain.AddChild(line);
            canvasMain.AddChild(cb);
            canvasMain.AddChild(tb);

            canvasMain.AddChild(border);
            border.Child = stack;
            stack.AddChild(stackBtn);
        }

        protected override void OnTick()
        {
            btn.Top += 10;      //Correct, button is moving
            tbtn.Top += 10;     //Correct, tbutton is moving
            border.Top += 10;   //Correct, border is moving
            cb.Top += 10;       //Correct, checkbox is moving
            tb.Top += 10;       //Correct, textbox is moving

            line.Y1 += 10;      //WRONG, not moving
            line.Y2 = line.Y1;  //WRONG, not moving
        }

        Canvas canvasMain = new();

        Button btn = new()
        {
            Top = 0,
            Left = 0,
            Text = "btn"
        };

        ToggleButton tbtn = new()
        {
            Top = 0,
            Left = 50,
            Text = "tbtn"
        };

        Border border = new()
        {
            Top = 0,
            Left = 100,

            BorderColor = Color.Red,
            BorderThickness = 2
        };

        StackPanel stack = new()
        {
            Orientation = Orientation.Vertical
        };

        Button stackBtn = new()
        {
            Top = 0,
            Text = "btnStack"
        };

        CheckBox cb = new()
        {
            Top = 0,
            Left = 200,
            Text = "cb"
        };

        TextBox tb = new()
        {
            Top = 0,
            Left = 250,
            Text = "tb"
        };

        Line line = new()
        {
            X1 = 0,
            Y1 = 200,
            X2 = 1000,
            Y2 = 200,
            StrokeThickness = 10,
            StrokeColor = Color.Red,
        };
    }
}


@tomas.malukas.work