From bd382997eb46a3da5cb04c73740e17cdf0e04499 Mon Sep 17 00:00:00 2001 From: Simon G Date: Sat, 10 Apr 2021 15:58:32 +0200 Subject: [PATCH] - fix driver loading --- Mystify/ViewModels/MainWindowViewModel.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Mystify/ViewModels/MainWindowViewModel.cs b/Mystify/ViewModels/MainWindowViewModel.cs index 9a8f7c3..c2f3ed0 100644 --- a/Mystify/ViewModels/MainWindowViewModel.cs +++ b/Mystify/ViewModels/MainWindowViewModel.cs @@ -45,9 +45,13 @@ namespace Mystify.ViewModels Filters = new List {new() {Extensions = new List {DriverLoader.DRIVER_FILE_EXTENSION}, Name = "Mystify Driver"}} }; - await openFileDialog.ShowAsync(_mainWindow); + string driverPath = (await openFileDialog.ShowAsync(_mainWindow))[0]; - _mainModel?.LoadDriverAndDevice(openFileDialog.Directory); + _mainModel?.LoadDriverAndDevice(driverPath); + + RaisePropertyChanged(() => SelectedDeviceText); + RaisePropertyChanged(() => Channels); + RaisePropertyChanged(() => Controllables); }); public ICommand AllocateControllableCommand =>