Skip to content

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed
 

‎src/gui/qgsmaptoolvertexedit.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,9 @@ bool QgsMapToolVertexEdit::snapVertexWithContext(QgsPoint& point)
241241
void QgsMapToolVertexEdit::canvasReleaseEvent(QMouseEvent * e)
242242
{
243243
if (mSnappedAtFeatureId == -1)
244-
return;
244+
{
245+
return;
246+
}
245247

246248
QgsVectorLayer* vlayer = dynamic_cast<QgsVectorLayer*>(mCanvas->currentLayer());
247249

‎src/gui/qgsvectorlayer.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,11 @@ void QgsVectorLayer::draw(QPainter * p, QgsRect * viewExtent, QgsMapToPixel * th
896896
m_renderer->renderFeature(p, *it, &marker, &markerScaleFactor,
897897
sel, widthScale);
898898
double scale = markerScaleFactor * symbolScale;
899+
if (mChangedGeometries.find((*it)->featureId()) != mChangedGeometries.end())
900+
{
901+
(*it)->setGeometry( mChangedGeometries[(*it)->featureId() ] );
902+
}
903+
mCachedGeometries[(*it)->featureId()] = (*it)->geometryAndOwnership();
899904
drawFeature(p,*it,theMapToPixelTransform,&marker,scale,
900905
projectionsEnabledFlag);
901906
}
@@ -1571,7 +1576,7 @@ std::vector<QgsField> const& QgsVectorLayer::fields() const
15711576

15721577
bool QgsVectorLayer::addFeature(QgsFeature* f, bool alsoUpdateExtent)
15731578
{
1574-
static int addedIdLowWaterMark = 0;
1579+
static int addedIdLowWaterMark = -1;
15751580

15761581
if(dataProvider)
15771582
{

0 commit comments

Comments
 (0)
Please sign in to comment.