Skip to content

Commit

Permalink
Avoid console noise when loading layouts
Browse files Browse the repository at this point in the history
(cherry picked from commit 4da0796)
  • Loading branch information
nyalldawson committed Jan 11, 2019
1 parent 680f2be commit 3376586
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/layout/qgslayoutitemmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ void QgsLayoutItemMap::refresh()

double QgsLayoutItemMap::scale() const
{
if ( rect().isEmpty() )
return 0;

QgsScaleCalculator calculator;
calculator.setMapUnits( crs().mapUnits() );
calculator.setDpi( 25.4 ); //Using mm
Expand Down

0 comments on commit 3376586

Please sign in to comment.