Skip to content

Commit f346dce

Browse files
lbartoletti3nids
authored andcommittedOct 23, 2018
Updating the vertexEditor after moving vertices or edges (#8032)
1 parent daf5394 commit f346dce

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
 

‎src/app/vertextool/qgsvertextool.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,6 +1580,9 @@ void QgsVertexTool::moveVertex( const QgsPointXY &mapPoint, const QgsPointLocato
15801580
}
15811581
}
15821582

1583+
if ( mVertexEditor )
1584+
mVertexEditor->updateEditor( dragLayer, mSelectedFeature.get() );
1585+
15831586
setHighlightedVertices( mSelectedVertices ); // update positions of existing highlighted vertices
15841587
setHighlightedVerticesVisible( true ); // time to show highlighted vertices again
15851588
}
@@ -1632,9 +1635,22 @@ void QgsVertexTool::applyEditsToLayers( QgsVertexTool::VertexEdits &edits )
16321635
layer->beginEditCommand( tr( "Moved vertex" ) );
16331636
QHash<QgsFeatureId, QgsGeometry>::iterator it2 = layerEdits.begin();
16341637
for ( ; it2 != layerEdits.end(); ++it2 )
1638+
{
16351639
layer->changeGeometry( it2.key(), it2.value() );
1640+
for ( int i = 0; i < mSelectedVertices.length(); ++i )
1641+
{
1642+
if ( mSelectedVertices.at( i ).layer == layer && mSelectedVertices.at( i ).fid == it2.value() )
1643+
{
1644+
mSelectedFeature->selectVertex( mSelectedVertices.at( i ).vertexId );
1645+
}
1646+
}
1647+
}
16361648
layer->endEditCommand();
16371649
layer->triggerRepaint();
1650+
1651+
1652+
if ( mVertexEditor )
1653+
mVertexEditor->updateEditor( layer, mSelectedFeature.get() );
16381654
}
16391655
}
16401656

0 commit comments

Comments
 (0)
Please sign in to comment.