Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
improved check for frame number after skip to end action
  • Loading branch information
Samweli authored and nyalldawson committed Apr 6, 2020
1 parent e2184cf commit 5199b91
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/src/core/testqgstemporalnavigationobject.cpp
Expand Up @@ -77,6 +77,14 @@ void TestQgsTemporalNavigationObject::cleanupTestCase()

void TestQgsTemporalNavigationObject::animationState()
{
QgsDateTimeRange range = QgsDateTimeRange(
QDateTime( QDate( 2020, 1, 1 ), QTime( 8, 0, 0 ) ),
QDateTime( QDate( 2020, 10, 1 ), QTime( 8, 0, 0 ) )
);
navigationObject->setTemporalExtents( range );

navigationObject->setFrameDuration( QgsInterval( 1, QgsUnitTypes::TemporalMonths ) );

qRegisterMetaType<QgsTemporalNavigationObject::AnimationState>( "AnimationState" );
QSignalSpy stateSignal( navigationObject, &QgsTemporalNavigationObject::stateChanged );

Expand Down Expand Up @@ -105,7 +113,7 @@ void TestQgsTemporalNavigationObject::animationState()
QCOMPARE( navigationObject->currentFrameNumber(), 0 );

navigationObject->skipToEnd();
QCOMPARE( navigationObject->currentFrameNumber(), navigationObject->totalFrameCount() - 1 );
QCOMPARE( navigationObject->currentFrameNumber(), 10 );

navigationObject->rewindToStart();
QCOMPARE( navigationObject->currentFrameNumber(), 0 );
Expand Down

0 comments on commit 5199b91

Please sign in to comment.