Skip to content

Commit

Permalink
[vertex tool] create the editor with an initial selection
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jun 7, 2018
1 parent c825f6e commit e46f789
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/vertextool/qgsvertextool.cpp
Expand Up @@ -1036,6 +1036,13 @@ void QgsVertexTool::showVertexEditor() //#spellok
return;

mSelectedFeature.reset( new QgsSelectedFeature( m.featureId(), m.layer(), mCanvas ) );
for ( int i = 0; i < mSelectedVertices.length(); ++i )
{
if ( mSelectedVertices.at( i ).layer == m.layer() && mSelectedVertices.at( i ).fid == m.featureId() )
{
mSelectedFeature->selectVertex( mSelectedVertices.at( i ).vertexId );
}
}
if ( !mVertexEditor )
{
mVertexEditor.reset( new QgsVertexEditor( m.layer(), mSelectedFeature.get(), mCanvas ) );
Expand Down

0 comments on commit e46f789

Please sign in to comment.