Skip to content

Commit

Permalink
mesh editing, fix default Z value when snap on 2D feature
Browse files Browse the repository at this point in the history
  • Loading branch information
vcloarec authored and nyalldawson committed Nov 19, 2022
1 parent e3d562b commit 718fda1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/mesh/qgsmaptooleditmeshframe.cpp
Expand Up @@ -2663,7 +2663,9 @@ void QgsMapToolEditMeshFrame::addVertex(

if ( mCadDockWidget->cadEnabled() && mCurrentFaceIndex == -1 )
zValue = currentZValue();
else if ( mapPointMatch.isValid() )
else if ( mapPointMatch.isValid() &&
mapPointMatch.layer() &&
QgsWkbTypes::hasZ( mapPointMatch.layer()->wkbType() ) )
{
QgsPoint layerPoint = mapPointMatch.interpolatedPoint( mCanvas->mapSettings().destinationCrs() );
zValue = layerPoint.z();
Expand Down

0 comments on commit 718fda1

Please sign in to comment.