Skip to content

Commit

Permalink
Hookup data defined tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 27, 2023
1 parent f22cd83 commit 7f03ce6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/core/layout/qgslayoutitemelevationprofile.cpp
Expand Up @@ -77,6 +77,26 @@ void QgsLayoutItemElevationProfile::refreshDataDefinedProperty( DataDefinedPrope

bool forceUpdate = false;

if ( ( property == QgsLayoutObject::ElevationProfileTolerance || property == QgsLayoutObject::AllProperties )
&& ( mDataDefinedProperties.isActive( QgsLayoutObject::ElevationProfileTolerance ) ) )
{
double value = mTolerance;

bool ok = false;
value = mDataDefinedProperties.valueAsDouble( QgsLayoutObject::ElevationProfileTolerance, context, value, &ok );

if ( !ok )
{
QgsMessageLog::logMessage( tr( "Elevation profile tolerance expression eval error" ) );
}
else
{
mTolerance = value;
}

forceUpdate = true;
}

if ( ( property == QgsLayoutObject::ElevationProfileMinimumDistance || property == QgsLayoutObject::AllProperties )
&& ( mDataDefinedProperties.isActive( QgsLayoutObject::ElevationProfileMinimumDistance ) ) )
{
Expand Down

0 comments on commit 7f03ce6

Please sign in to comment.