diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-25 07:03:25 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-25 07:03:25 +0200 |
commit | 0f445ac2661b5454d491936bb780196b13d1f4ea (patch) | |
tree | 6bc408bf05717464430ba7562368f0fd34c76ef7 /opentrack | |
parent | 39d87e711d3eed36d4fecf48250becaa8cbdfb56 (diff) |
shortcuts: remove duplication
Diffstat (limited to 'opentrack')
-rw-r--r-- | opentrack/shortcuts.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/opentrack/shortcuts.cpp b/opentrack/shortcuts.cpp index 1dd77e4c..63cd9088 100644 --- a/opentrack/shortcuts.cpp +++ b/opentrack/shortcuts.cpp @@ -128,8 +128,8 @@ void Shortcuts::bind_keyboard_shortcut(K &key, key_opts& k) if (!key) key = std::make_shared<QxtGlobalShortcut>(); else { - key->setEnabled(false); key->setShortcut(QKeySequence::UnknownKey); + key->setEnabled(false); } if (k.keycode != "") @@ -159,23 +159,6 @@ void Shortcuts::bind_keyboard_shortcut(K &key, key_opts& k) #endif void Shortcuts::reload() { -#ifndef _WIN32 - if (keyCenter) - { - keyCenter->setShortcut(QKeySequence::UnknownKey); - keyCenter->setEnabled(false); - } - if (keyToggle) - { - keyToggle->setShortcut(QKeySequence::UnknownKey); - keyToggle->setEnabled(false); - } - if (keyZero) - { - keyZero->setShortcut(QKeySequence::UnknownKey); - keyZero->setEnabled(false); - } -#endif bind_keyboard_shortcut(keyCenter, s.center); bind_keyboard_shortcut(keyToggle, s.toggle); bind_keyboard_shortcut(keyZero, s.zero); |