Skip to content

Commit 1cb4adc

Browse files
committed
Fix recording of points for live GPS tracking (fixes #14996)
1 parent 47eae58 commit 1cb4adc

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/app/gps/qgsgpsinformationwidget.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -818,19 +818,16 @@ void QgsGPSInformationWidget::on_mBtnCloseFeature_clicked()
818818
{
819819
QgsFeature* f = new QgsFeature( 0 );
820820

821-
int size = 0;
822-
int wkbtype = 0;
823-
824821
QgsCoordinateTransform t( mWgs84CRS, vlayer->crs() );
825822
QgsPoint myPoint = t.transform( mLastGpsPosition );
826823
double x = myPoint.x();
827824
double y = myPoint.y();
828825

829-
size = 1 + sizeof( int ) + 2 * sizeof( double );
826+
int size = 1 + sizeof( int ) + 2 * sizeof( double );
830827
unsigned char *buf = new unsigned char[size];
831828

832829
QgsWkbPtr wkbPtr( buf, size );
833-
wkbPtr << ( char ) QgsApplication::endian() << wkbtype << x << y;
830+
wkbPtr << ( char ) QgsApplication::endian() << QGis::WKBPoint << x << y;
834831

835832
QgsGeometry *g = new QgsGeometry();
836833
g->fromWkb( buf, size );

0 commit comments

Comments
 (0)