Navigation Menu

Skip to content

Commit

Permalink
Adds QgsMapToolEdit::defaultMValue()
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti committed Apr 30, 2021
1 parent 76c0d11 commit 7c3d4d0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gui/qgsmaptooledit.cpp
Expand Up @@ -39,6 +39,11 @@ double QgsMapToolEdit::defaultZValue() const
return QgsSettingsRegistryCore::settingsDigitizingDefaultZValue.value();
}

double QgsMapToolEdit::defaultMValue() const
{
return QgsSettings().value( QStringLiteral( "/qgis/digitizing/default_m_value" ), Qgis::DEFAULT_M_COORDINATE ).toDouble();
}

QColor QgsMapToolEdit::digitizingStrokeColor()
{
return QColor( QgsSettingsRegistryCore::settingsDigitizingLineColorRed.value(),
Expand Down
6 changes: 6 additions & 0 deletions src/gui/qgsmaptooledit.h
Expand Up @@ -44,6 +44,12 @@ class GUI_EXPORT QgsMapToolEdit: public QgsMapTool
*/
double defaultZValue() const;

/**
* Returns default M value
* Use for set M coordinate to new vertex for 2.5d geometries
*/
double defaultMValue() const;

private slots:
//! Vector layers' editingStopped SIGNAL will eventually trigger a clean
void connectLayers( const QList<QgsMapLayer *> &layers );
Expand Down

0 comments on commit 7c3d4d0

Please sign in to comment.