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

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

No files matched your search

@@ -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;
} }
@@ -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;
} }
} }
} }