Skip to content

Commit

Permalink
mispelling doc and explicit geometry name
Browse files Browse the repository at this point in the history
  • Loading branch information
luipir committed Sep 26, 2017
1 parent bbfa048 commit f276216
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions python/core/qgsvectorlayereditbuffer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ class QgsVectorLayerEditBuffer : QObject

/** Apply geom modification basing on provider geometry type.
* Geom is modified only if successful convertion is possibile.
* In case of convertion a message is notified in the log
* @param geom pointer to the geometry that is adapted to provider
* In case of conversion a message is sent to the log.
* @param geometry pointer to the geometry that should be adapted to provider
* @return bool true if success
* @note added in QGIS 2.18
*/
bool adaptGeometry( QgsGeometry* geom );
bool adaptGeometry( QgsGeometry* geometry );
};
12 changes: 6 additions & 6 deletions src/core/qgsvectorlayereditbuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ bool QgsVectorLayerEditBuffer::deleteFeatures( const QgsFeatureIds& fids )
return true;
}

bool QgsVectorLayerEditBuffer::adaptGeometry( QgsGeometry* geom )
bool QgsVectorLayerEditBuffer::adaptGeometry( QgsGeometry* geometry )
{
/* this routine was introduced to fi the following issue:
* https://issues.qgis.org/issues/15741
Expand All @@ -190,21 +190,21 @@ bool QgsVectorLayerEditBuffer::adaptGeometry( QgsGeometry* geom )
* https://issues.qgis.org/issues/15741
*/
QgsVectorDataProvider* provider = L->dataProvider();
if ( geom && geom->geometry() &&
!geom->isEmpty() &&
geom->wkbType() != provider->geometryType() )
if ( geometry && geometry->geometry() &&
!geometry->isEmpty() &&
geometry->wkbType() != provider->geometryType() )
{
// check if provider do strict geometry control
// otherwise leave to the commit to rise provider errors
if ( provider->doesStrictFeatureTypeCheck() )
{
QgsGeometry* newGeom = provider->convertToProviderType( geom );
QgsGeometry* newGeom = provider->convertToProviderType( geometry );
if ( !newGeom )
{
QgsMessageLog::logMessage( tr( "ERROR: geometry type is not compatible with the layer.", "not compatible geometry" ) );
return false;
}
geom = newGeom;
geometry = newGeom;
}
}
return true;
Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsvectorlayereditbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,12 @@ class CORE_EXPORT QgsVectorLayerEditBuffer : public QObject

/** Apply geom modification basing on provider geometry type.
* Geom is modified only if successful convertion is possibile.
* In case of convertion a message is notified in the log
* @param geom pointer to the geometry that is adapted to provider
* In case of conversion a message is sent to the log.
* @param geometry pointer to the geometry that should be adapted to provider
* @return bool true if success
* @note added in QGIS 2.18
*/
bool adaptGeometry( QgsGeometry* geom );
bool adaptGeometry( QgsGeometry* geometry );

protected:
QgsVectorLayer* L;
Expand Down

0 comments on commit f276216

Please sign in to comment.