GridComicsView: ignore unhandled key presses

When a key not handled by Grid view is pressed while it has focus, the
following warning appears in Library's output
qrc:/qml/GridComicsView.qml:776: Error: Cannot assign [undefined] to int
AND the top-left cover is selected. The added early return fixes both
issues.
This commit is contained in:
Igor Kushnir 2021-02-11 12:33:32 +02:00 committed by Luis Ángel San Martín
parent 2acfbbfac7
commit 68e9f06a13

View File

@ -806,6 +806,8 @@ Rectangle {
}
else if (event.key === Qt.Key_Down) {
ci = Math.min(grid.currentIndex+numCells,grid.count - 1);
} else {
return;
}
event.accepted = true;