mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Allow deleting selected messages by backspace.
This commit is contained in:
parent
6cdc8f9dbc
commit
4df7761e9d
2 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue