Skip to content
Permalink
Browse files

Updating the vertexEditor after moving vertices or edges (#8032)

  • Loading branch information
lbartoletti authored and 3nids committed Oct 23, 2018
1 parent daf5394 commit f346dceeaff3bedf77eef6ca2a5c13308c2309ce
Showing with 16 additions and 0 deletions.
  1. +16 −0 src/app/vertextool/qgsvertextool.cpp
@@ -1580,6 +1580,9 @@ void QgsVertexTool::moveVertex( const QgsPointXY &mapPoint, const QgsPointLocato
}
}

if ( mVertexEditor )
mVertexEditor->updateEditor( dragLayer, mSelectedFeature.get() );

setHighlightedVertices( mSelectedVertices ); // update positions of existing highlighted vertices
setHighlightedVerticesVisible( true ); // time to show highlighted vertices again
}
@@ -1632,9 +1635,22 @@ void QgsVertexTool::applyEditsToLayers( QgsVertexTool::VertexEdits &edits )
layer->beginEditCommand( tr( "Moved vertex" ) );
QHash<QgsFeatureId, QgsGeometry>::iterator it2 = layerEdits.begin();
for ( ; it2 != layerEdits.end(); ++it2 )
{
layer->changeGeometry( it2.key(), it2.value() );
for ( int i = 0; i < mSelectedVertices.length(); ++i )
{
if ( mSelectedVertices.at( i ).layer == layer && mSelectedVertices.at( i ).fid == it2.value() )
{
mSelectedFeature->selectVertex( mSelectedVertices.at( i ).vertexId );
}
}
}
layer->endEditCommand();
layer->triggerRepaint();


if ( mVertexEditor )
mVertexEditor->updateEditor( layer, mSelectedFeature.get() );
}
}

0 comments on commit f346dce

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