File tree 1 file changed +2
-8
lines changed
1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -59,18 +59,12 @@ void QgsComposerHtml::setUrl( const QUrl& url )
59
59
}
60
60
61
61
if ( frameCount () < 1 ) return ;
62
- // QSize contentsSize = mWebPage->mainFrame()->contentsSize();
63
62
64
- QRectF contentRect = this ->mFrameItems .at ( 0 )->boundingRect ();
65
- // there is going to be a little rounding error converting from float to int
66
- QSize contentsSize = QSize (( int )( contentRect.width () * mHtmlUnitsToMM ),
67
- ( int )( contentRect.height () * mHtmlUnitsToMM ) );
63
+ QSize contentsSize = mWebPage ->mainFrame ()->contentsSize ();
64
+ contentsSize.setWidth ( mFrameItems .at ( 0 )->boundingRect ().width () * mHtmlUnitsToMM );
68
65
mWebPage ->setViewportSize ( contentsSize );
69
-
70
- // suppress scroll bars always
71
66
mWebPage ->mainFrame ()->setScrollBarPolicy ( Qt::Horizontal, Qt::ScrollBarAlwaysOff );
72
67
mWebPage ->mainFrame ()->setScrollBarPolicy ( Qt::Vertical, Qt::ScrollBarAlwaysOff );
73
-
74
68
mSize .setWidth ( contentsSize.width () / mHtmlUnitsToMM );
75
69
mSize .setHeight ( contentsSize.height () / mHtmlUnitsToMM );
76
70
recalculateFrameSizes ();
You can’t perform that action at this time.
0 commit comments