Skip to content

Commit 931e89b

Browse files
committed
Fix iOS build
1 parent b186942 commit 931e89b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/position/providers/internalpositionprovider.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ void InternalPositionProvider::parsePositionUpdate( const QGeoPositionInfo &posi
150150
#ifdef Q_OS_IOS
151151
// on ios we can get both ellipsoid and geoid altitude, depending on what is available we transform the altitude or not
152152
// we also check if the user set vertical CRS pass through in plugin, which prohibits any transformation
153+
bool valueRead = false;
153154
const bool isVerticalCRSPassedThrough = QVariant( QgsProject::instance()->readEntry( QStringLiteral( "Mergin" ), QStringLiteral( "VerticalCRSPassThrough" ), QVariant( true ).toString(), &valueRead ) ).toBool();
154155
const bool isEllipsoidalAltitude = localPosition.attribute( QGeoPositionInfo::VerticalSpeed );
155156
localPosition.removeAttribute( QGeoPositionInfo::VerticalSpeed );
@@ -166,7 +167,7 @@ void InternalPositionProvider::parsePositionUpdate( const QGeoPositionInfo &posi
166167
{localPosition.coordinate().longitude(), localPosition.coordinate().latitude(), localPosition.coordinate().altitude()},
167168
positionOutsideGeoidModelArea );
168169
}
169-
else if ( isMockedLocation && isEllipsoidalAltitude && !isVerticalCRSPassedThrough )
170+
else if ( isMockedLocation && isEllipsoidalAltitude && valueRead && !isVerticalCRSPassedThrough )
170171
{
171172
// transform the altitude from EPSG:4979 (WGS84 (EPSG:4326) + ellipsoidal height) to specified geoid model
172173
geoidPosition = InputUtils::transformPoint(

0 commit comments

Comments
 (0)