Skip to content
Permalink
Browse files

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 c7e675c3432279830861ae1a006d3f89f6c0d225
Showing with 2 additions and 0 deletions.
  1. +2 −0 tests/src/gui/testqgsmapcanvas.cpp
@@ -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 );
}

0 comments on commit c7e675c

Please sign in to comment.
You can’t perform that action at this time.