Skip to content
Permalink
Browse files

updating time step and time step unit when frame duration has changed

  • Loading branch information
Samweli authored and nyalldawson committed Jan 6, 2021
1 parent bfcc7a8 commit 3d320a26d95d377c56d07c7fcc3568ba71294015
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/core/qgstemporalnavigationobject.cpp
@@ -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 );

0 comments on commit 3d320a2

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