Commit 4a1c43df authored by Fabio D'Urso's avatar Fabio D'Urso

Do not use pixmaps from tiled requests to calculate the contents bounding box

parent 8f57ae5e
......@@ -219,9 +219,11 @@ void Generator::generatePixmap( PixmapRequest *request )
Q_D( Generator );
d->mPixmapReady = false;
const bool calcBoundingBox = !request->isTile() && !request->page()->isBoundingBoxKnown();
if ( request->asynchronous() && hasFeature( Threaded ) )
{
d->pixmapGenerationThread()->startGeneration( request, !request->page()->isBoundingBoxKnown() );
d->pixmapGenerationThread()->startGeneration( request, calcBoundingBox );
/**
* We create the text page for every page that is visible to the
......@@ -237,13 +239,12 @@ void Generator::generatePixmap( PixmapRequest *request )
const QImage& img = image( request );
request->page()->setPixmap( request->id(), new QPixmap( QPixmap::fromImage( img ) ), request->normalizedRect() );
const bool bboxKnown = request->page()->isBoundingBoxKnown();
const int pageNumber = request->page()->number();
d->mPixmapReady = true;
signalPixmapRequestDone( request );
if ( !bboxKnown )
if ( calcBoundingBox )
updatePageBoundingBox( pageNumber, Utils::imageBoundingBox( &img ) );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment