Skip to content
Permalink
Browse files

Do not bypass edit buffer

  • Loading branch information
m-kuhn committed Aug 23, 2018
1 parent 9e387e4 commit 93eef9f000682a6462defaf074012c536a7a46cc
Showing with 11 additions and 11 deletions.
  1. +11 −11 src/core/qgsvectorlayereditutils.cpp
@@ -46,7 +46,7 @@ bool QgsVectorLayerEditUtils::insertVertex( double x, double y, QgsFeatureId atF

geometry.insertVertex( x, y, beforeVertex );

mLayer->editBuffer()->changeGeometry( atFeatureId, geometry );
mLayer->changeGeometry( atFeatureId, geometry );
return true;
}

@@ -63,7 +63,7 @@ bool QgsVectorLayerEditUtils::insertVertex( const QgsPoint &point, QgsFeatureId

geometry.insertVertex( point, beforeVertex );

mLayer->editBuffer()->changeGeometry( atFeatureId, geometry );
mLayer->changeGeometry( atFeatureId, geometry );
return true;
}

@@ -86,7 +86,7 @@ bool QgsVectorLayerEditUtils::moveVertex( const QgsPoint &p, QgsFeatureId atFeat

geometry.moveVertex( p, atVertex );

mLayer->editBuffer()->changeGeometry( atFeatureId, geometry );
mLayer->changeGeometry( atFeatureId, geometry );
return true;
}

@@ -111,7 +111,7 @@ QgsVectorLayer::EditResult QgsVectorLayerEditUtils::deleteVertex( QgsFeatureId f
geometry.set( nullptr );
}

mLayer->editBuffer()->changeGeometry( featureId, geometry );
mLayer->changeGeometry( featureId, geometry );
return !geometry.isNull() ? QgsVectorLayer::Success : QgsVectorLayer::EmptyGeometry;
}

@@ -158,7 +158,7 @@ QgsGeometry::OperationResult QgsVectorLayerEditUtils::addRing( QgsCurve *ring, c
if ( addRingReturnCode == 0 )
if ( addRingReturnCode == QgsGeometry::Success )
{
mLayer->editBuffer()->changeGeometry( f.id(), g );
mLayer->changeGeometry( f.id(), g );
if ( modifiedFeatureId )
*modifiedFeatureId = f.id();

@@ -211,7 +211,7 @@ QgsGeometry::OperationResult QgsVectorLayerEditUtils::addPart( const QgsPointSeq
//convert back to single part if required by layer
geometry.convertToSingleType();
}
mLayer->editBuffer()->changeGeometry( featureId, geometry );
mLayer->changeGeometry( featureId, geometry );
}
return errorCode;
}
@@ -246,7 +246,7 @@ QgsGeometry::OperationResult QgsVectorLayerEditUtils::addPart( QgsCurve *ring, Q
//convert back to single part if required by layer
geometry.convertToSingleType();
}
mLayer->editBuffer()->changeGeometry( featureId, geometry );
mLayer->changeGeometry( featureId, geometry );
}
return errorCode;
}
@@ -266,7 +266,7 @@ int QgsVectorLayerEditUtils::translateFeature( QgsFeatureId featureId, double dx
int errorCode = geometry.translate( dx, dy );
if ( errorCode == 0 )
{
mLayer->editBuffer()->changeGeometry( featureId, geometry );
mLayer->changeGeometry( featureId, geometry );
}
return errorCode;
}
@@ -347,13 +347,13 @@ QgsGeometry::OperationResult QgsVectorLayerEditUtils::splitFeatures( const QVect
if ( splitFunctionReturn == QgsGeometry::OperationResult::Success )
{
//change this geometry
mLayer->editBuffer()->changeGeometry( feat.id(), featureGeom );
mLayer->changeGeometry( feat.id(), featureGeom );

//insert new features
for ( int i = 0; i < newGeometries.size(); ++i )
{
QgsFeature f = QgsVectorLayerUtils::createFeature( mLayer, newGeometries.at( i ), feat.attributes().toMap() );
mLayer->editBuffer()->addFeature( f );
mLayer->addFeature( f );
}

if ( topologicalEditing )
@@ -469,7 +469,7 @@ QgsGeometry::OperationResult QgsVectorLayerEditUtils::splitParts( const QVector<

if ( !addPartRet )
{
mLayer->editBuffer()->changeGeometry( feat.id(), featureGeom );
mLayer->changeGeometry( feat.id(), featureGeom );
}

if ( topologicalEditing )

0 comments on commit 93eef9f

Please sign in to comment.
You can’t perform that action at this time.