Skip to content

Commit

Permalink
Fix calculation of smart breaks when html has transparent background
Browse files Browse the repository at this point in the history
Should finally fix troublesome composer html tests
  • Loading branch information
nyalldawson committed Dec 2, 2014
1 parent 823d45a commit 0f76194
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/core/composer/qgscomposerhtml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ void QgsComposerHtml::renderCachedImage()
{
return;
}
mRenderedPage->fill( Qt::transparent );
QPainter painter;
painter.begin( mRenderedPage );
mWebPage->mainFrame()->render( &painter );
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/testqgscomposerhtml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgscomposerhtml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0f76194

Please sign in to comment.