Skip to content
Permalink
Browse files

cleaning + more comments

  • Loading branch information
luipir committed Sep 26, 2017
1 parent d0859f1 commit 1aaad7be99e6cb8fc5ad19de44a5d7990bf80fee
Showing with 9 additions and 4 deletions.
  1. +2 −0 src/core/qgsvectordataprovider.cpp
  2. +7 −4 src/core/qgsvectorlayereditbuffer.cpp
@@ -715,6 +715,7 @@ QgsGeometry* QgsVectorDataProvider::convertToProviderType( const QgsGeometry* ge
}

// remove Z if provider does not have
// control added to fix https://issues.qgis.org/issues/16927
if ( !QgsWKBTypes::hasZ( providerGeomType ) && QgsWKBTypes::hasZ( geometry->wkbType() ) )
{
if ( !outputGeom )
@@ -725,6 +726,7 @@ QgsGeometry* QgsVectorDataProvider::convertToProviderType( const QgsGeometry* ge
}

// remove M if provider does not have
// control added as follow-up of https://issues.qgis.org/issues/16927
if ( !QgsWKBTypes::hasM( providerGeomType ) && QgsWKBTypes::hasM( geometry->wkbType() ) )
{
if ( !outputGeom )
@@ -113,9 +113,6 @@ void QgsVectorLayerEditBuffer::updateChangedAttributes( QgsFeature &f )
f.setAttributes( attrs );
}




bool QgsVectorLayerEditBuffer::addFeature( QgsFeature& f )
{
QgsVectorDataProvider* provider = L->dataProvider();
@@ -135,7 +132,6 @@ bool QgsVectorLayerEditBuffer::addFeature( QgsFeature& f )
return true;
}


bool QgsVectorLayerEditBuffer::addFeatures( QgsFeatureList& features )
{
if ( !( L->dataProvider()->capabilities() & QgsVectorDataProvider::AddFeatures ) )
@@ -186,6 +182,13 @@ bool QgsVectorLayerEditBuffer::deleteFeatures( const QgsFeatureIds& fids )

bool QgsVectorLayerEditBuffer::adaptGeometry( QgsGeometry* geom )
{
/* this routine was introduced to fi the following issue:
* https://issues.qgis.org/issues/15741
* and later used in changeGeometry and addFeature to
* fix also the following issue
* https://issues.qgis.org/issues/16948
* https://issues.qgis.org/issues/15741
*/
QgsVectorDataProvider* provider = L->dataProvider();
if ( geom && geom->geometry() &&
!geom->isEmpty() &&

0 comments on commit 1aaad7b

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