Skip to content
Permalink
Browse files

Update src/core/qgstemporalnavigationobject.cpp as suggested

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
  • Loading branch information
rduivenvoorde and nyalldawson committed Feb 12, 2021
1 parent 89735ed commit e923edc419ec9f00beb85291aaf485ab89943ef0
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/qgstemporalnavigationobject.cpp
@@ -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

0 comments on commit e923edc

Please sign in to comment.