Skip to content
Permalink
Browse files

#9060: use QGis::fromUnitToUnitFactor in QgsComposerScaleBar

  • Loading branch information
ahuarte47 committed Jan 14, 2014
1 parent c20f38b commit 23f6a231b08422820305a858e354ac42ae88b561
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/composer/qgscomposerscalebar.cpp
@@ -196,11 +196,11 @@ double QgsComposerScaleBar::mapWidth() const
double measure = da.measureLine( QgsPoint( composerMapRect.xMinimum(), composerMapRect.yMinimum() ), QgsPoint( composerMapRect.xMaximum(), composerMapRect.yMinimum() ) );
if ( mUnits == QgsComposerScaleBar::Feet )
{
measure /= 0.3048;
measure /= QGis::fromUnitToUnitFactor( QGis::Feet, QGis::Meters );
}
else if ( mUnits == QgsComposerScaleBar::NauticalMiles )
{
measure /= 1852.0;
measure /= QGis::fromUnitToUnitFactor( QGis::NauticalMiles, QGis::Meters );
}
return measure;
}

0 comments on commit 23f6a23

Please sign in to comment.
You can’t perform that action at this time.