Skip to content

Commit

Permalink
Update src/core/qgstemporalnavigationobject.cpp as suggested
Browse files Browse the repository at this point in the history
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
  • Loading branch information
rduivenvoorde and nyalldawson committed Feb 12, 2021
1 parent 89735ed commit e923edc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgstemporalnavigationobject.cpp
Expand Up @@ -319,7 +319,7 @@ long long QgsTemporalNavigationObject::findBestFrameNumberForFrameStart( const Q
long long roughFrameEnd = totalFrameCount();
// For the smaller step frames we calculate an educated guess, to prevent the loop becoming too
// large, freezing the ui (eg having a mTemporalExtents of several months and the user selects milliseconds)
if ( mFrameDuration.seconds() < QgsInterval::MONTHS )
if ( mFrameDuration.originalUnit() != QgsUnitTypes::TemporalMonths && mFrameDuration.originalUnit() != QgsUnitTypes::TemporalYears && mFrameDuration.originalUnit() != QgsUnitTypes::TemporalDecades && mFrameDuration.originalUnit() != QgsUnitTypes::TemporalCenturies )
{
// Only if we receive a valid frameStart, that is within current mTemporalExtents
// We tend to receive a framestart of 'now()' upon startup for example
Expand Down

0 comments on commit e923edc

Please sign in to comment.