Skip to content

Commit 4da0796

Browse files
committedJan 8, 2019
Avoid console noise when loading layouts
1 parent 098aad5 commit 4da0796

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎src/core/layout/qgslayoutitemmap.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ void QgsLayoutItemMap::refresh()
138138

139139
double QgsLayoutItemMap::scale() const
140140
{
141+
if ( rect().isEmpty() )
142+
return 0;
143+
141144
QgsScaleCalculator calculator;
142145
calculator.setMapUnits( crs().mapUnits() );
143146
calculator.setDpi( 25.4 ); //Using mm

0 commit comments

Comments
 (0)
Please sign in to comment.