Allow deleting selected messages by backspace.

This commit is contained in:
John Preston 2023-09-25 12:55:29 +04:00
parent 6cdc8f9dbc
commit 4df7761e9d
2 changed files with 2 additions and 2 deletions

View File

@ -2911,7 +2911,7 @@ void HistoryInner::keyPressEvent(QKeyEvent *e) {
&& !showCopyRestrictionForSelected()) {
TextUtilities::SetClipboardText(getSelectedText(), QClipboard::FindBuffer);
#endif // Q_OS_MAC
} else if (e == QKeySequence::Delete) {
} else if (e == QKeySequence::Delete || e->key() == Qt::Key_Backspace) {
auto selectedState = getSelectionState();
if (selectedState.count > 0
&& selectedState.canDeleteCount == selectedState.count) {

View File

@ -2451,7 +2451,7 @@ void ListWidget::keyPressEvent(QKeyEvent *e) {
&& !hasCopyRestrictionForSelected()) {
TextUtilities::SetClipboardText(getSelectedText(), QClipboard::FindBuffer);
#endif // Q_OS_MAC
} else if (e == QKeySequence::Delete) {
} else if (e == QKeySequence::Delete || e->key() == Qt::Key_Backspace) {
_delegate->listDeleteRequest();
} else if (!(e->modifiers() & ~Qt::ShiftModifier)
&& e->key() != Qt::Key_Shift) {