Fix MultiKeyEdit clear action not re-aligning key sequences

This commit is contained in:
BigBahss 2020-11-09 02:56:22 -05:00
parent 2fb3bf4e26
commit 9a3609ee6d

View file

@ -167,8 +167,8 @@ void MultiKeyEdit::onEditingFinished() {
void MultiKeyEdit::showDefaultContextMenu(QLineEdit *lineEdit, const QPoint &pos) {
QMenu menu(this);
QAction clearAction("Clear Shortcut", &menu);
connect(&clearAction, &QAction::triggered, lineEdit, [&lineEdit]() {
lineEdit->clear();
connect(&clearAction, &QAction::triggered, lineEdit, [this, &lineEdit]() {
removeOne(lineEdit->text());
});
menu.addAction(&clearAction);
menu.exec(lineEdit->mapToGlobal(pos));