Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 8, 2016
1 parent 02cc0cc commit 6f82713
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/qgspallabeling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2898,7 +2898,7 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, QgsRenderContext &cont
{
distance *= vectorScaleFactor;
}
double d = ptOne.distance( ptZero ) * distance;
double d = sqrt( ptOne.sqrDist( ptZero ) ) * distance;
( *labelFeature )->setDistLabel( d );
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayerdiagramprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,6 @@ QgsLabelFeature* QgsVectorLayerDiagramProvider::registerDiagram( QgsFeature& fea

QgsPoint ptZero = mSettings.xform->toMapCoordinates( 0, 0 );
QgsPoint ptOne = mSettings.xform->toMapCoordinates( 1, 0 );
lf->setDistLabel( ptOne.distance( ptZero ) * mSettings.dist );
lf->setDistLabel( sqrt( ptOne.sqrDist( ptZero ) ) * mSettings.dist );
return lf;
}

0 comments on commit 6f82713

Please sign in to comment.