Skip to content
Permalink
Browse files

Fix calculation of smart breaks when html has transparent background

Should finally fix troublesome composer html tests
  • Loading branch information
nyalldawson committed Dec 2, 2014
1 parent 823d45a commit 0f761949b8e64084dcc27d2293785e8259c99e43
@@ -273,6 +273,7 @@ void QgsComposerHtml::renderCachedImage()
{
return;
}
mRenderedPage->fill( Qt::transparent );
QPainter painter;
painter.begin( mRenderedPage );
mWebPage->mainFrame()->render( &painter );
@@ -214,7 +214,7 @@ void TestQgsComposerHtml::htmlMultiFrameSmartBreak()

//page2
QgsCompositionChecker checker2( "composerhtml_smartbreaks2", mComposition );
result = checker2.testComposition( mReport, 1, 3000 ) && result;
result = checker2.testComposition( mReport, 1, 200 ) && result;

mComposition->removeMultiFrame( htmlItem );
delete htmlItem;
@@ -119,7 +119,7 @@ def testHtmlSmartBreaks(self):
print "Checking page 2"
myPage = 1
checker2 = QgsCompositionChecker('composerhtml_smartbreaks2', self.mComposition)
myTestResult, myMessage = checker2.testComposition( myPage, 3000 )
myTestResult, myMessage = checker2.testComposition( myPage, 200 )
assert myTestResult, myMessage

self.mComposition.removeMultiFrame( composerHtml )
Binary file not shown.

0 comments on commit 0f76194

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