Skip to content

Commit

Permalink
Merge pull request #2908 from SebDieBln/Test_ImprovePanningTest
Browse files Browse the repository at this point in the history
improve the test of panning the map canvas by keyboard
  • Loading branch information
m-kuhn committed Mar 14, 2016
2 parents 1f8e94e + c7e675c commit bd6508a
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(); QgsRectangle originalExtent = mCanvas->extent();
Q_FOREACH ( Qt::Key key, keys ) Q_FOREACH ( Qt::Key key, keys )
{ {
QgsRectangle tempExtent = mCanvas->extent();
QKeyEvent keyEvent( QEvent::KeyPress, key, Qt::NoModifier ); QKeyEvent keyEvent( QEvent::KeyPress, key, Qt::NoModifier );
QApplication::sendEvent( mCanvas, &keyEvent ); QApplication::sendEvent( mCanvas, &keyEvent );
QVERIFY( mCanvas->extent() != tempExtent );
} }
QVERIFY( mCanvas->extent() == originalExtent ); QVERIFY( mCanvas->extent() == originalExtent );
} }
Expand Down

0 comments on commit bd6508a

Please sign in to comment.