Skip to content

Commit

Permalink
updated cumulative range logic in temporal controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Samweli authored and nyalldawson committed May 10, 2020
1 parent f3f04a9 commit 65d5c14
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/core/qgstemporalnavigationobject.cpp
Expand Up @@ -93,13 +93,15 @@ QgsDateTimeRange QgsTemporalNavigationObject::dateTimeRangeForFrameNumber( long
const QDateTime begin = start.addSecs( frame * mFrameDuration.seconds() );
const QDateTime end = start.addSecs( nextFrame * mFrameDuration.seconds() );

QDateTime frameStart = begin;

if ( mCumulativeTemporalRange )
return QgsDateTimeRange( start, begin, true, false );
frameStart = start;

if ( end <= mTemporalExtents.end() )
return QgsDateTimeRange( begin, end, true, false );
return QgsDateTimeRange( frameStart, end, true, false );

return QgsDateTimeRange( begin, mTemporalExtents.end(), true, false );
return QgsDateTimeRange( frameStart, mTemporalExtents.end(), true, false );
}

void QgsTemporalNavigationObject::setTemporalExtents( const QgsDateTimeRange &temporalExtents )
Expand Down

0 comments on commit 65d5c14

Please sign in to comment.