Skip to content

Commit

Permalink
Fix scalebar decoration uses incorrect map extent when restoring
Browse files Browse the repository at this point in the history
a project which was saved using a different map canvas geometry

Fixes #40748
  • Loading branch information
nyalldawson committed Jan 19, 2021
1 parent 740c41f commit f1ea5a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/decorations/qgsdecorationscalebar.cpp
Expand Up @@ -210,7 +210,7 @@ void QgsDecorationScaleBar::setupScaleBar()

double QgsDecorationScaleBar::mapWidth( const QgsMapSettings &settings ) const
{
const QgsRectangle mapExtent = settings.extent();
const QgsRectangle mapExtent = settings.visibleExtent();
if ( mSettings.units() == QgsUnitTypes::DistanceUnknownUnit )
{
return mapExtent.width();
Expand Down

0 comments on commit f1ea5a9

Please sign in to comment.