From 0721b80555fec3c2e6200518412f15ca790d127e Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 26 Jul 2016 19:11:33 +0300 Subject: [PATCH] Moved Enter key press handle from HistoryInner to HistoryWidget. --- Telegram/SourceFiles/historywidget.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 87b1c9bb8..a46a42433 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -1481,10 +1481,6 @@ void HistoryInner::keyPressEvent(QKeyEvent *e) { if (!_selected.isEmpty() && selectedForDelete == selectedForForward) { _widget->onDeleteSelected(); } - } else if (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) { - if (_selected.isEmpty()) { - _widget->onListEnterPressed(); - } } else { e->ignore(); } @@ -7216,6 +7212,8 @@ void HistoryWidget::keyPressEvent(QKeyEvent *e) { } _scroll.keyPressEvent(e); } + } else if (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) { + onListEnterPressed(); } else { e->ignore(); }