Added ability to cancel selection in calendar box with Esc key.
This commit is contained in:
parent
46fb5ee1d2
commit
4ee9751feb
|
@ -1100,7 +1100,11 @@ void CalendarBox::resizeEvent(QResizeEvent *e) {
|
|||
|
||||
void CalendarBox::keyPressEvent(QKeyEvent *e) {
|
||||
if (e->key() == Qt::Key_Escape) {
|
||||
e->ignore();
|
||||
if (_context->selectionMode()) {
|
||||
_context->toggleSelectionMode(false);
|
||||
} else {
|
||||
e->ignore();
|
||||
}
|
||||
} else if (e->key() == Qt::Key_Home) {
|
||||
jump(_previous.data());
|
||||
} else if (e->key() == Qt::Key_End) {
|
||||
|
|
Loading…
Reference in New Issue