From 0438b7ac82dfdb3262232ad2724ba4605d1927da Mon Sep 17 00:00:00 2001 From: ArsenArsen Date: Thu, 29 Jun 2017 16:33:28 +0200 Subject: [PATCH] Add a way to unbind keys (delete the bind) --- hotkeyinputdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotkeyinputdialog.cpp b/hotkeyinputdialog.cpp index deb9103..8663f15 100644 --- a/hotkeyinputdialog.cpp +++ b/hotkeyinputdialog.cpp @@ -11,7 +11,7 @@ HotkeyInputDialog::HotkeyInputDialog(QString hotkeyName, QKeySequence currentSeq setWindowTitle(hotkeyName); connect(this, &QDialog::accepted, [&] { QKeySequence s(ui->keySeq->text()); - if (!s.toString().isEmpty()) emit sequenceSelected(s, windowTitle()); + if (ui->keySeq->text().isEmpty() || !s.toString().isEmpty()) emit sequenceSelected(s, windowTitle()); }); }