Skip to content

Commit

Permalink
rename QgsVectorLayerEditUtils::deleteVertexV2
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Aug 10, 2016
1 parent 39c4409 commit 4e8635b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 22 deletions.
1 change: 1 addition & 0 deletions doc/api_break.dox
Expand Up @@ -160,6 +160,7 @@ This page tries to maintain a list with incompatible changes that happened in pr
<tr><td>QgsVectorLayer<td>editorWidgetV2Type<td>editorWidgetType
<tr><td>QgsVectorLayer<td>deleteVertexV2<td>deleteVertex
<tr><td>QgsVectorLayer<td>rendererV2<td>renderer
<tr><td>QgsVectorLayerEditUtils<td>deleteVertexV2<td>deleteVertex
</table>

\subsection qgis_api_break_3_0_removed_classes Removed Classes
Expand Down
8 changes: 1 addition & 7 deletions python/core/qgsvectorlayereditutils.sip
Expand Up @@ -28,18 +28,12 @@ class QgsVectorLayerEditUtils
*/
bool moveVertex( const QgsPointV2& p, QgsFeatureId atFeatureId, int atVertex ) /PyName=moveVertexV2/;

/** Deletes a vertex from a feature
* @deprecated use deleteVertexV2() instead
*/
bool deleteVertex( QgsFeatureId atFeatureId, int atVertex ) /Deprecated/;

/** Deletes a vertex from a feature.
* @param featureId ID of feature to remove vertex from
* @param vertex index of vertex to delete
* @note added in QGIS 2.14
*/
//TODO QGIS 3.0 - rename to deleteVertex
QgsVectorLayer::EditResult deleteVertexV2( QgsFeatureId featureId, int vertex );
QgsVectorLayer::EditResult deleteVertex( QgsFeatureId featureId, int vertex );

/** Adds a ring to polygon/multipolygon features
* @param ring ring to add
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayer.cpp
Expand Up @@ -1060,7 +1060,7 @@ QgsVectorLayer::EditResult QgsVectorLayer::deleteVertex( QgsFeatureId featureId,
return QgsVectorLayer::InvalidLayer;

QgsVectorLayerEditUtils utils( this );
EditResult result = utils.deleteVertexV2( featureId, vertex );
EditResult result = utils.deleteVertex( featureId, vertex );

if ( result == Success )
updateExtents();
Expand Down
8 changes: 1 addition & 7 deletions src/core/qgsvectorlayereditutils.cpp
Expand Up @@ -85,13 +85,7 @@ bool QgsVectorLayerEditUtils::moveVertex( const QgsPointV2& p, QgsFeatureId atFe
}


bool QgsVectorLayerEditUtils::deleteVertex( QgsFeatureId atFeatureId, int atVertex )
{
QgsVectorLayer::EditResult res = deleteVertexV2( atFeatureId, atVertex );
return res == QgsVectorLayer::Success || res == QgsVectorLayer::EmptyGeometry;
}

QgsVectorLayer::EditResult QgsVectorLayerEditUtils::deleteVertexV2( QgsFeatureId featureId, int vertex )
QgsVectorLayer::EditResult QgsVectorLayerEditUtils::deleteVertex( QgsFeatureId featureId, int vertex )
{
if ( !L->hasGeometryType() )
return QgsVectorLayer::InvalidLayer;
Expand Down
8 changes: 1 addition & 7 deletions src/core/qgsvectorlayereditutils.h
Expand Up @@ -53,18 +53,12 @@ class CORE_EXPORT QgsVectorLayerEditUtils
*/
bool moveVertex( const QgsPointV2& p, QgsFeatureId atFeatureId, int atVertex );

/** Deletes a vertex from a feature
* @deprecated use deleteVertexV2() instead
*/
Q_DECL_DEPRECATED bool deleteVertex( QgsFeatureId atFeatureId, int atVertex );

/** Deletes a vertex from a feature.
* @param featureId ID of feature to remove vertex from
* @param vertex index of vertex to delete
* @note added in QGIS 2.14
*/
//TODO QGIS 3.0 - rename to deleteVertex
QgsVectorLayer::EditResult deleteVertexV2( QgsFeatureId featureId, int vertex );
QgsVectorLayer::EditResult deleteVertex( QgsFeatureId featureId, int vertex );

/** Adds a ring to polygon/multipolygon features
* @param ring ring to add
Expand Down

0 comments on commit 4e8635b

Please sign in to comment.