Skip to content

Commit 8f8628e

Browse files
lbartolettinyalldawson
authored andcommittedSep 12, 2021
fix default M value
1 parent d81d236 commit 8f8628e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/gui/qgsadvanceddigitizingdockwidget.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ void QgsAdvancedDigitizingDockWidget::switchZM( )
338338
mMLabel->setEnabled( QgsWkbTypes::hasM( type ) );
339339
mMLineEdit->setEnabled( QgsWkbTypes::hasM( type ) );
340340
if ( mMLineEdit->isEnabled() )
341-
mMLineEdit->setText( QLocale().toString( 0.0, 'f', 6 ) );
341+
mZLineEdit->setText( QLocale().toString( QgsMapToolEdit( mMapCanvas ).defaultMValue(), 'f', 6 ) );
342342
else
343343
mMLineEdit->clear();
344344
mLockMButton->setEnabled( QgsWkbTypes::hasM( type ) );
@@ -862,7 +862,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent *e )
862862
else
863863
{
864864
point.setZ( QgsMapToolEdit( mMapCanvas ).defaultZValue() );
865-
point.setM( 0.0 );
865+
point.setM( QgsMapToolEdit( mMapCanvas ).defaultMValue() );
866866
}
867867
// update the point list
868868
updateCurrentPoint( point );
@@ -955,7 +955,7 @@ void QgsAdvancedDigitizingDockWidget::updateUnlockedConstraintValues( const QgsP
955955
}
956956
else
957957
{
958-
mMConstraint->setValue( 0.0 );
958+
mMConstraint->setValue( point.m() );
959959
}
960960
}
961961
}

0 commit comments

Comments
 (0)
Please sign in to comment.