Skip to content
Permalink
Browse files

nodetool: fix crash when deleting last vertex (fixes #10367)

  • Loading branch information
jef-n committed Jun 1, 2014
1 parent 701c227 commit a516c36b9170f1133bcde2439e09b6c03948f05a
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/app/nodetool/qgsselectedfeature.cpp
@@ -535,6 +535,9 @@ void QgsSelectedFeature::createVertexMap()

void QgsSelectedFeature::selectVertex( int vertexNr )
{
if ( vertexNr < 0 || vertexNr >= mVertexMap.size() )
return;

QgsVertexEntry *entry = mVertexMap[vertexNr];
entry->setSelected();
entry->update();
@@ -550,6 +553,9 @@ void QgsSelectedFeature::selectVertex( int vertexNr )

void QgsSelectedFeature::deselectVertex( int vertexNr )
{
if ( vertexNr < 0 || vertexNr >= mVertexMap.size() )
return;

QgsVertexEntry *entry = mVertexMap[vertexNr];
entry->setSelected( false );
entry->update();
@@ -574,6 +580,9 @@ void QgsSelectedFeature::deselectAllVertexes()

void QgsSelectedFeature::invertVertexSelection( int vertexNr, bool invert )
{
if ( vertexNr < 0 || vertexNr >= mVertexMap.size() )
return;

QgsVertexEntry *entry = mVertexMap[vertexNr];

bool selected = !entry->isSelected();

0 comments on commit a516c36

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