Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix vertextool
  • Loading branch information
lbartoletti committed Oct 1, 2021
1 parent efb082b commit 2fb69d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/mesh/qgsmaptooleditmeshframe.cpp
Expand Up @@ -2574,7 +2574,7 @@ void QgsMapToolEditMeshFrame::addVertex(
zValue = currentZValue();
else if ( mapPointMatch.isValid() )
{
QgsPoint layerPoint = mapPointMatch.interpolatedPoint();
QgsPoint layerPoint = mapPointMatch.interpolatedPoint( QgsProject::instance()->crs(), mCurrentLayer );
zValue = layerPoint.z();
}
else if ( mCurrentFaceIndex != -1 ) //we are on a face -->interpolate the z value
Expand Down
4 changes: 3 additions & 1 deletion src/app/vertextool/qgsvertextool.cpp
Expand Up @@ -2135,7 +2135,9 @@ void QgsVertexTool::moveVertex( const QgsPointXY &mapPoint, const QgsPointLocato

// needed to get Z value
if ( mapPointMatch && mapPointMatch->layer() && QgsWkbTypes::hasZ( mapPointMatch->layer()->wkbType() ) && ( mapPointMatch->hasEdge() || mapPointMatch->hasMiddleSegment() ) )
layerPoint = toLayerCoordinates( dragLayer, mapPointMatch->interpolatedPoint() );
{
layerPoint = mapPointMatch->interpolatedPoint( QgsProject::instance()->crs(), dragLayer );
}

QgsVertexId vid;
if ( !geom.vertexIdFromVertexNr( dragVertexId, vid ) )
Expand Down

0 comments on commit 2fb69d0

Please sign in to comment.