Skip to content

Commit

Permalink
The fallback keyboard shortcut is the default one (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo-Peyronnet committed Apr 17, 2022
1 parent 6a4eff1 commit 8758bef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ColorPicker/Pages/SettingsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ private void EditCopyShortcutBtn_Click(object sender, RoutedEventArgs e)
{
GlobalHook.KeyDown -= GlobalHook_KeyDown; // Unsubscribe
Global.KeyBoardShortcutsAvailable = true; // Set
if (CopyShortcutTxt.Text.Length == 0) CopyShortcutTxt.Text = "Shift+C"; // Set default
if (CopyShortcutTxt.Text.Length == 0) CopyShortcutTxt.Text = Global.Settings.CopyKeyboardShortcut; // Set default

Global.Settings.CopyKeyboardShortcut = CopyShortcutTxt.Text; // Set
SettingsManager.Save(); // Save changes
Expand All @@ -553,7 +553,7 @@ private void EditSelectShortcutBtn_Click(object sender, RoutedEventArgs e)
{
GlobalHook.KeyDown -= GlobalHook_KeyDown; // Unsubscribe
Global.KeyBoardShortcutsAvailable = true; // Set
if (SelectShortcutTxt.Text.Length == 0) SelectShortcutTxt.Text = "Shift+S"; // Set default
if (SelectShortcutTxt.Text.Length == 0) SelectShortcutTxt.Text = Global.Settings.SelectKeyboardShortcut; // Set default

Global.Settings.SelectKeyboardShortcut = SelectShortcutTxt.Text; // Set
SettingsManager.Save(); // Save changes
Expand Down

0 comments on commit 8758bef

Please sign in to comment.