Fixed freeze when changing active surface config

This commit is contained in:
SpoinkyNL committed 2019-10-27 22:19:42 +01:00
1 parent 89bd76387b
commit 4126f5622e
3 files changed
+22 -18

No files matched your search

@@ -27,7 +27,7 @@ namespace Artemis.UI.ViewModels.Controls.SurfaceEditor
}
}
public SurfaceDeviceConfiguration DeviceConfiguration { get; }
public SurfaceDeviceConfiguration DeviceConfiguration { get; set; }
public SelectionStatus SelectionStatus { get; set; }
public Cursor Cursor { get; set; }
@@ -8,18 +8,22 @@ namespace Artemis.UI.ViewModels.Controls.SurfaceEditor
public SurfaceLedViewModel(Led led)
{
Led = led;
ApplyLedToViewModel();
}
public void ApplyLedToViewModel()
{
X = Led.LedRectangle.X;
Y = Led.LedRectangle.Y;
Width = Led.LedRectangle.Width;
Height = Led.LedRectangle.Height;
}
public Led Led { get; }
public Led Led { get; set; }
public double X { get; }
public double Y { get; }
public double Width { get; }
public double Height { get; }
public double X { get; set; }
public double Y { get; set; }
public double Width { get; set; }
public double Height { get; set; }
}
}