From e62d3c14b03632bc25b66d31e5ee40b5ad561906 Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Sat, 21 Oct 2023 17:44:49 +0700 Subject: [PATCH] When resuming tracking, do not erase the last vertex from the previous session --- src/core/rubberbandmodel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/rubberbandmodel.cpp b/src/core/rubberbandmodel.cpp index 5dce35d468..450e2f6f21 100644 --- a/src/core/rubberbandmodel.cpp +++ b/src/core/rubberbandmodel.cpp @@ -341,6 +341,9 @@ void RubberbandModel::setDataFromGeometry( QgsGeometry geometry, const QgsCoordi mPointList << pt; } + // insert the last point twice so the resutling rubberband's current coordinate property being modified (by e.g. + // the GNSS position) will not replace the last vertex from the passed geometry + mPointList << pt; mCurrentCoordinateIndex = mPointList.size() - 1;