Skip to content

Commit

Permalink
cosmetic changes for m
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti authored and nyalldawson committed Sep 12, 2021
1 parent 16d8630 commit c2897fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgsmaptoolcapture.cpp
Expand Up @@ -515,7 +515,7 @@ int QgsMapToolCapture::fetchLayerPoint( const QgsPointLocator::Match &match, Qgs
if ( QgsWkbTypes::hasZ( vlayer->wkbType() ) && !layerPoint.is3D() )
layerPoint.addZValue( mCadDockWidget && mCadDockWidget->cadEnabled() ? mCadDockWidget->currentPoint().z() : defaultZValue() );
if ( QgsWkbTypes::hasM( vlayer->wkbType() ) && !layerPoint.isMeasure() )
layerPoint.addMValue( defaultMValue() );
layerPoint.addMValue( mCadDockWidget && mCadDockWidget->cadEnabled() ? mCadDockWidget->currentPoint().m() : defaultMValue() );
}

// ZM support depends on the target layer
Expand Down Expand Up @@ -1023,7 +1023,7 @@ QgsPoint QgsMapToolCapture::mapPoint( const QgsPointXY &point ) const
// set m value if necessary
if ( QgsWkbTypes::hasM( newPoint.wkbType() ) )
{
newPoint.setM( defaultMValue() );
newPoint.setM( mCadDockWidget && mCadDockWidget->cadEnabled() ? mCadDockWidget->currentPoint().m() : defaultMValue() );
}

return newPoint;
Expand Down

0 comments on commit c2897fa

Please sign in to comment.