mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[GUI] Ensure devices list is filled in UI thread.
This commit is contained in:
@@ -146,18 +146,21 @@ public partial class DeviceListViewModel : ViewModelBase
|
||||
|
||||
Devices = [];
|
||||
|
||||
foreach(DeviceInfo device in devices)
|
||||
Dispatcher.UIThread.Invoke(() =>
|
||||
{
|
||||
Devices.Add(new DeviceModel
|
||||
foreach(DeviceInfo device in devices)
|
||||
{
|
||||
Bus = device.Bus,
|
||||
Model = device.Model,
|
||||
Path = device.Path,
|
||||
Serial = device.Serial,
|
||||
Supported = device.Supported,
|
||||
Vendor = device.Vendor
|
||||
});
|
||||
}
|
||||
Devices.Add(new DeviceModel
|
||||
{
|
||||
Bus = device.Bus,
|
||||
Model = device.Model,
|
||||
Path = device.Path,
|
||||
Serial = device.Serial,
|
||||
Supported = device.Supported,
|
||||
Vendor = device.Vendor
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(SocketException ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user