Skip to content

Commit

Permalink
Disable move vertex tool for point layers (fixes bug 979)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8363 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Apr 17, 2008
1 parent dcec81f commit 12a709f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -4858,7 +4858,11 @@ void QgisApp::activateDeactivateLayerRelatedActions(QgsMapLayer* layer)
mActionSplitFeatures->setEnabled(false);
if(vlayer->isEditable() && dprovider->capabilities() & QgsVectorDataProvider::ChangeGeometries)
{
mActionMoveVertex->setEnabled(true);
//don't enable vertex move for single point
if(vlayer->geometryType() != QGis::WKBPoint && vlayer->geometryType() != QGis::WKBPoint25D)
{
mActionMoveVertex->setEnabled(true);
}
mActionMoveFeature->setEnabled(true);
}
return;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsgeometry.cpp
Expand Up @@ -1445,7 +1445,7 @@ bool QgsGeometry::deleteVertexAt(int atVertex)
int* nPoints = (int*)ptr;
if((*nPoints) < 3 || vertexnr > (*nPoints)-1 || vertexnr < 0) //line needs at least 2 vertices
{
delete newbuffer;
delete newbuffer;
return false;
}
int newNPoints = (*nPoints)-1; //new number of points
Expand Down

0 comments on commit 12a709f

Please sign in to comment.