1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Improved digital zoom/fullscreen interaction

This commit is contained in:
Martin Tůma 2017-04-06 19:54:50 +02:00
parent ce1c76a315
commit 322792ea04
2 changed files with 6 additions and 4 deletions

View File

@ -1318,6 +1318,7 @@ void GUI::keyPressEvent(QKeyEvent *event)
if (_fullscreenAction->isChecked()) {
_fullscreenAction->setChecked(false);
showFullscreen(false);
return;
}
break;
}
@ -1326,6 +1327,7 @@ void GUI::keyPressEvent(QKeyEvent *event)
if (!(event->modifiers() & MODIFIER))
closeFiles();
openFile(file);
return;
}
QMainWindow::keyPressEvent(event);

View File

@ -457,10 +457,10 @@ void PathView::keyPressEvent(QKeyEvent *event)
z = 1;
else if (event->matches(ZOOM_OUT))
z = -1;
else {
if (_digitalZoom && event->key() == Qt::Key_Escape )
resetDigitalZoom();
else if (_digitalZoom && event->key() == Qt::Key_Escape) {
resetDigitalZoom();
return;
} else {
QGraphicsView::keyPressEvent(event);
return;
}