Fix shortcuts editor clear buttons
This commit is contained in:
parent
941174d0ea
commit
db1aabe3c2
2 changed files with 9 additions and 0 deletions
|
@ -18,6 +18,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fix the metatile selector rectangle jumping when selecting up or left of the origin.
|
- Fix the metatile selector rectangle jumping when selecting up or left of the origin.
|
||||||
- Fix the event group tabs sometimes showing an event from the wrong group
|
- Fix the event group tabs sometimes showing an event from the wrong group
|
||||||
|
- Fix the clear buttons in the Shortcuts Editor not actually removing shortcuts.
|
||||||
- Fix API error reporting
|
- Fix API error reporting
|
||||||
|
|
||||||
## [5.2.0] - 2024-01-02
|
## [5.2.0] - 2024-01-02
|
||||||
|
|
|
@ -140,6 +140,14 @@ void MultiKeyEdit::addNewKeySequenceEdit() {
|
||||||
connect(lineEdit, &QLineEdit::customContextMenuRequested,
|
connect(lineEdit, &QLineEdit::customContextMenuRequested,
|
||||||
this, &MultiKeyEdit::customContextMenuRequested);
|
this, &MultiKeyEdit::customContextMenuRequested);
|
||||||
|
|
||||||
|
// Gross way to connect the line edit's clear button.
|
||||||
|
auto actions = lineEdit->findChildren<QAction*>();
|
||||||
|
if (!actions.isEmpty()) {
|
||||||
|
connect(actions.first(), &QAction::triggered, this, [this, keySequenceEdit]() {
|
||||||
|
removeOne(keySequenceEdit->keySequence());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
layout()->addWidget(keySequenceEdit);
|
layout()->addWidget(keySequenceEdit);
|
||||||
keySequenceEdit_vec.append(keySequenceEdit);
|
keySequenceEdit_vec.append(keySequenceEdit);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue