1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-02-17 16:20:48 +01:00

Simplified zoom key bindings

Closes #99
This commit is contained in:
Martin Tůma 2018-05-09 18:18:58 +02:00
parent dfb48d17bf
commit bd6c6ef344
2 changed files with 4 additions and 6 deletions

View File

@ -9,10 +9,8 @@
#define FIRST_KEY Qt::Key_Home
#define LAST_KEY Qt::Key_End
#define MODIFIER Qt::ShiftModifier
#define ZOOM_IN QKeySequence::ZoomIn
#define ZOOM_OUT QKeySequence::ZoomOut
#define ZOOM_IN Qt::Key_Plus
#define ZOOM_OUT Qt::Key_Minus
#define TOGGLE_GRAPH_TYPE_KEY Qt::Key_X
#define TOGGLE_TIME_TYPE_KEY Qt::Key_T

View File

@ -473,9 +473,9 @@ void MapView::keyPressEvent(QKeyEvent *event)
QPoint pos = viewport()->rect().center();
if (event->matches(ZOOM_IN))
if (event->key() == ZOOM_IN)
z = 1;
else if (event->matches(ZOOM_OUT))
else if (event->key() == ZOOM_OUT)
z = -1;
else if (_digitalZoom && event->key() == Qt::Key_Escape) {
digitalZoom(0);