Skip to content

Commit 586e14c

Browse files
committedJul 5, 2016
Fix recording of points for live GPS tracking (fixes #14996)
(cherry picked from commit 1cb4adc)
1 parent cd35952 commit 586e14c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed
 

‎src/app/gps/qgsgpsinformationwidget.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -817,19 +817,16 @@ void QgsGPSInformationWidget::on_mBtnCloseFeature_clicked()
817817
{
818818
QgsFeature* f = new QgsFeature( 0 );
819819

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

828-
size = 1 + sizeof( int ) + 2 * sizeof( double );
825+
int size = 1 + sizeof( int ) + 2 * sizeof( double );
829826
unsigned char *buf = new unsigned char[size];
830827

831828
QgsWkbPtr wkbPtr( buf, size );
832-
wkbPtr << ( char ) QgsApplication::endian() << wkbtype << x << y;
829+
wkbPtr << ( char ) QgsApplication::endian() << QGis::WKBPoint << x << y;
833830

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

0 commit comments

Comments
 (0)
Please sign in to comment.