1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Fixed a bug where the program would get stuck trying to connect to an unconnected keyboard

This commit is contained in:
SpoinkyNL 2016-04-27 20:19:51 +02:00
parent 160476ee13
commit 7cb80f7234
2 changed files with 5 additions and 3 deletions

View File

@ -52,6 +52,8 @@ namespace Artemis.Managers
if (!keyboardProvider.CanEnable()) if (!keyboardProvider.CanEnable())
{ {
_mainManager.DialogService.ShowErrorMessageBox(keyboardProvider.CantEnableText); _mainManager.DialogService.ShowErrorMessageBox(keyboardProvider.CantEnableText);
General.Default.LastKeyboard = null;
General.Default.Save();
return; return;
} }

View File

@ -126,9 +126,9 @@ namespace Artemis.ViewModels.Flyouts
protected override void HandleOpen() protected override void HandleOpen()
{ {
SelectedKeyboardProvider = General.Default.LastKeyboard.Length > 0 SelectedKeyboardProvider = string.IsNullOrEmpty(General.Default.LastKeyboard)
? General.Default.LastKeyboard ? "None"
: "None"; : General.Default.LastKeyboard;
} }
} }
} }