Skip to content

Commit

Permalink
Add check to NOT emit signal when temporalExtents are not actually ch…
Browse files Browse the repository at this point in the history
…anged
  • Loading branch information
rduivenvoorde committed Sep 4, 2020
1 parent f27027f commit 7d4738a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/qgstemporalnavigationobject.cpp
Expand Up @@ -128,7 +128,11 @@ void QgsTemporalNavigationObject::setNavigationMode( const NavigationMode mode )

void QgsTemporalNavigationObject::setTemporalExtents( const QgsDateTimeRange &temporalExtents )
{
mTemporalExtents = temporalExtents;
if ( !( mTemporalExtents == temporalExtents ) )
{
mTemporalExtents = temporalExtents;
emit temporalExtentsChanged( mTemporalExtents );
}

switch ( mNavigationMode )
{
Expand All @@ -149,7 +153,6 @@ void QgsTemporalNavigationObject::setTemporalExtents( const QgsDateTimeRange &te
break;
}

emit temporalExtentsChanged( mTemporalExtents );
}

QgsDateTimeRange QgsTemporalNavigationObject::temporalExtents() const
Expand Down

0 comments on commit 7d4738a

Please sign in to comment.