diff options
Diffstat (limited to 'logic')
-rw-r--r-- | logic/shortcuts.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/logic/shortcuts.cpp b/logic/shortcuts.cpp index a0027fea..377fa3e5 100644 --- a/logic/shortcuts.cpp +++ b/logic/shortcuts.cpp @@ -141,8 +141,9 @@ void Shortcuts::reload(const t_keys& keys_) const int idx = keys.size() - 1; tt& kk_ = keys[idx]; auto fn = std::get<1>(kk_); - connect(k, &QxtGlobalShortcut::activated, [fn, held](bool keydown) { - if (keydown || !held) + bool held_ = held; + connect(k, &QxtGlobalShortcut::activated, [fn, held_](bool keydown) { + if (keydown || !held_) fn(keydown); }); #endif |