1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-12 21:38:38 +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())
{
_mainManager.DialogService.ShowErrorMessageBox(keyboardProvider.CantEnableText);
General.Default.LastKeyboard = null;
General.Default.Save();
return;
}

View File

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