mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Added ability to cancel selection in calendar box with Esc key.
This commit is contained in:
parent
46fb5ee1d2
commit
4ee9751feb
1 changed files with 5 additions and 1 deletions
|
@ -1100,7 +1100,11 @@ void CalendarBox::resizeEvent(QResizeEvent *e) {
|
||||||
|
|
||||||
void CalendarBox::keyPressEvent(QKeyEvent *e) {
|
void CalendarBox::keyPressEvent(QKeyEvent *e) {
|
||||||
if (e->key() == Qt::Key_Escape) {
|
if (e->key() == Qt::Key_Escape) {
|
||||||
e->ignore();
|
if (_context->selectionMode()) {
|
||||||
|
_context->toggleSelectionMode(false);
|
||||||
|
} else {
|
||||||
|
e->ignore();
|
||||||
|
}
|
||||||
} else if (e->key() == Qt::Key_Home) {
|
} else if (e->key() == Qt::Key_Home) {
|
||||||
jump(_previous.data());
|
jump(_previous.data());
|
||||||
} else if (e->key() == Qt::Key_End) {
|
} else if (e->key() == Qt::Key_End) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue