Moved Enter key press handle from HistoryInner to HistoryWidget.

This commit is contained in:
John Preston 2016-07-26 19:11:33 +03:00
parent 75ff3c3d28
commit 0721b80555
1 changed files with 2 additions and 4 deletions

View File

@ -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();
}