Skip to content
Permalink
Browse files

Merge branch 'master' of github.com:timlinux/Quantum-GIS

  • Loading branch information
timlinux committed Sep 20, 2012
2 parents 05ae00d + 88ca822 commit 6ac87920d0867649cc6db8b619f33ebd8c7ffff9
@@ -57,9 +57,20 @@ void QgsComposerHtml::setUrl( const QUrl& url )
{
qApp->processEvents();
}
QSize contentsSize = mWebPage->mainFrame()->contentsSize();

if ( nFrames() < 1) return;
//QSize contentsSize = mWebPage->mainFrame()->contentsSize();

QRectF contentRect = this->mFrameItems.at(0)->boundingRect();
//there is going to be a little rounding error converting from float to int
QSize contentsSize = QSize( (int)(contentRect.width() * mHtmlUnitsToMM),
(int)(contentRect.height() * mHtmlUnitsToMM));
mWebPage->setViewportSize( contentsSize );

//suppress scroll bars always
mWebPage->mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
mWebPage->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);

mSize.setWidth( contentsSize.width() / mHtmlUnitsToMM );
mSize.setHeight( contentsSize.height() / mHtmlUnitsToMM );
recalculateFrameSizes();
@@ -101,6 +101,7 @@ def testTableMultiFrame(self):
checker2 = QgsCompositionChecker()
myControlImage = self.controlImagePath(
"composerhtml_table_multiframe2.png")
print "Checking page 2"
myResult, myMessage = checker2.testComposition("Composer html table",
self.mComposition,
myControlImage,
@@ -115,6 +116,7 @@ def testTableMultiFrame(self):
self.mComposition,
myControlImage,
myPage)
print "Checking page 3"
assert myResult, myMessage

if __name__ == '__main__':
@@ -10,7 +10,7 @@
from qgis_interface import QgisInterface
import hashlib

QGISAPP = None # Static vainasafele used to hold hand to running QGis app
QGISAPP = None # Static variable used to hold hand to running QGis app
CANVAS = None
PARENT = None
IFACE = None

0 comments on commit 6ac8792

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