Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix clang tidy warnings
  • Loading branch information
nyalldawson committed May 20, 2023
1 parent 7c7d5dc commit 4e80c9b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/gui/elevation/qgselevationprofilecanvas.cpp
Expand Up @@ -1062,10 +1062,8 @@ void QgsElevationProfileCanvas::zoomFull()

const QgsDoubleRange zRange = mCurrentJob->zRange();

double xMinimum = mPlotItem->xMinimum();
double xMaximum = mPlotItem->xMaximum();
double yMinimum = mPlotItem->yMinimum();
double yMaximum = mPlotItem->yMaximum();
double yMinimum = 0;
double yMaximum = 0;

if ( zRange.upper() < zRange.lower() )
{
Expand All @@ -1088,9 +1086,9 @@ void QgsElevationProfileCanvas::zoomFull()
}

const double profileLength = profileCurve()->length();
xMinimum = 0;
double xMinimum = 0;
// just 2% margin to max distance -- any more is overkill and wasted space
xMaximum = profileLength * 1.02;
double xMaximum = profileLength * 1.02;

if ( mLockAxisScales )
{
Expand Down

0 comments on commit 4e80c9b

Please sign in to comment.