mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 10:08:31 +00:00
Fixed wrong Surface-Canvas update if no device is added but moved
This commit is contained in:
parent
568a0e9b02
commit
af9b56948f
@ -79,11 +79,14 @@ namespace RGB.NET.WPF.Controls
|
|||||||
|
|
||||||
private void UpdateSurface()
|
private void UpdateSurface()
|
||||||
{
|
{
|
||||||
if ((_canvas == null) || (_newDevices.Count == 0)) return;
|
if ((_canvas == null) || (_surface == null)) return;
|
||||||
|
|
||||||
|
if (_newDevices.Count > 0)
|
||||||
|
{
|
||||||
foreach (IRGBDevice device in _newDevices)
|
foreach (IRGBDevice device in _newDevices)
|
||||||
_canvas.Children.Add(new RGBDeviceVisualizer { Device = device });
|
_canvas.Children.Add(new RGBDeviceVisualizer { Device = device });
|
||||||
_newDevices.Clear();
|
_newDevices.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
_canvas.Width = _surface.SurfaceRectangle.Size.Width;
|
_canvas.Width = _surface.SurfaceRectangle.Size.Width;
|
||||||
_canvas.Height = _surface.SurfaceRectangle.Size.Height;
|
_canvas.Height = _surface.SurfaceRectangle.Size.Height;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user