Skip to content

Commit

Permalink
Upping the loop to 100 (else miss with month->days)
Browse files Browse the repository at this point in the history
  • Loading branch information
rduivenvoorde authored and nyalldawson committed Feb 12, 2021
1 parent d096ef2 commit 73efd1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgstemporalnavigationobject.cpp
Expand Up @@ -321,7 +321,7 @@ long long QgsTemporalNavigationObject::findBestFrameNumberForFrameStart( const Q
// because of the 'fluidity' of the DateTime units (notable months and years), there seems to be a theoretical chance
// to overshoot. So in that case fail and return to startFrame (so max number of loops is just 10)
long long roughFrameStart = std::floor( ( frameStart - mTemporalExtents.begin() ).seconds() / mFrameDuration.seconds() );
for ( long long i = roughFrameStart; i < roughFrameStart + 10; ++i )
for ( long long i = roughFrameStart; i < roughFrameStart + 100; ++i )
{
QgsDateTimeRange range = dateTimeRangeForFrameNumber( i );
if ( range.overlaps( testFrame ) )
Expand Down

0 comments on commit 73efd1a

Please sign in to comment.