Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
improve the test of panning the map canvas by keyboard
Verify the extent is changed after each key event.
  • Loading branch information
SebDieBln committed Mar 13, 2016
1 parent 48911ca commit c7e675c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/src/gui/testqgsmapcanvas.cpp
Expand Up @@ -145,8 +145,10 @@ void TestQgsMapCanvas::testPanByKeyboard()
QgsRectangle originalExtent = mCanvas->extent();
Q_FOREACH ( Qt::Key key, keys )
{
QgsRectangle tempExtent = mCanvas->extent();
QKeyEvent keyEvent( QEvent::KeyPress, key, Qt::NoModifier );
QApplication::sendEvent( mCanvas, &keyEvent );
QVERIFY( mCanvas->extent() != tempExtent );
}
QVERIFY( mCanvas->extent() == originalExtent );
}
Expand Down

0 comments on commit c7e675c

Please sign in to comment.