mirror of
https://github.com/huderlem/porymap.git
synced 2026-03-21 17:45:44 -05:00
Fix Shortcuts Editor clear text buttons
This commit is contained in:
parent
301666e5bd
commit
66c8302c00
|
|
@ -35,6 +35,8 @@ and this project somewhat adheres to [Semantic Versioning](https://semver.org/sp
|
|||
- Fix click-drag map selections behaving unexpectedly when the cursor is outside the map grid.
|
||||
- Fix events being dragged in negative coordinates lagging behind the cursor.
|
||||
- Fix the shortcut for duplicating events working while on the Connections tab.
|
||||
- Fix the Shortcuts Editor displaying the duplicate shortcut prompt repeatedly.
|
||||
- Fix clear text button on the left in each row of the Shortcuts Editor also clearing the shortcut on the right.
|
||||
- Fix Undo/Redo ignoring the automatic resizing that occurs if a layout/border was an unexpected size.
|
||||
- Fix the Region Map Editor incorrectly displaying whether a `MAPSEC` has region map data.
|
||||
- Fix broken error message for the primary tileset on the new map/layout dialogs.
|
||||
|
|
|
|||
|
|
@ -137,14 +137,6 @@ void MultiKeyEdit::addNewKeySequenceEdit() {
|
|||
connect(lineEdit, &QLineEdit::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);
|
||||
this->keySequenceEdits.append(keySequenceEdit);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ void ShortcutsEditor::promptUserOnDuplicateFound(MultiKeyEdit *sender, MultiKeyE
|
|||
.arg(duplicateKeySequence.toString())
|
||||
.arg(siblingLabel);
|
||||
|
||||
// QKeySequenceEdits::keySequenceChange fires when editing finishes on a QKeySequenceEdit,
|
||||
// QKeySequenceEdit::keySequenceChanged fires when editing finishes on a QKeySequenceEdit,
|
||||
// even if no change occurs. Displaying our question prompt will cause the edit to lose focus
|
||||
// and fire another signal, which would cause another "duplicate shortcut" prompt to appear.
|
||||
// For this reason we need to block their signals before the message is displayed.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user