Skip to content

Commit

Permalink
Avoid pilling up a bunch of signals while in background
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Dec 27, 2024
1 parent 6964d98 commit ee879da
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/core/positioning/positioningsource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,13 @@ void PositioningSource::lastGnssPositionInformationChanged( const GnssPositionIn
mPositionInformation = positionInformation;
}

emit positionInformationChanged();
if ( mAveragedPosition )
if ( !mBackgroundMode )
{
emit averagedPositionCountChanged();
emit positionInformationChanged();
if ( mAveragedPosition )
{
emit averagedPositionCountChanged();
}
}
}

Expand All @@ -311,7 +314,10 @@ void PositioningSource::processCompassReading()
if ( mOrientation != orientation )
{
mOrientation = orientation;
emit orientationChanged();
if ( !mBackgroundMode )
{
emit orientationChanged();
}
}
}
}
Expand Down

0 comments on commit ee879da

Please sign in to comment.