Skip to content

Commit

Permalink
updating time step and time step unit when frame duration has changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Samweli authored and nyalldawson committed Jan 6, 2021
1 parent bfcc7a8 commit 3d320a2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/qgstemporalnavigationobject.cpp
Expand Up @@ -193,6 +193,11 @@ void QgsTemporalNavigationObject::setFrameDuration( QgsInterval frameDuration )
}
QgsDateTimeRange oldFrame = dateTimeRangeForFrameNumber( currentFrameNumber() );
mFrameDuration = frameDuration;

// sync frame duration with time step and time step unit.
mFrameTimeStep = mFrameDuration.duration();
mFrameTimeStepUnit = mFrameDuration.unit();

mCurrentFrameNumber = findBestFrameNumberForFrameStart( oldFrame.begin() );
emit temporalFrameDurationChanged( mFrameDuration );

Expand Down

0 comments on commit 3d320a2

Please sign in to comment.