Call Generator::signalPixmapRequestDone _after_ saving the calculated bounding box

Fixes a bug that causes the extraction of a wrong bounding box:

If the request queue is not empty, signalPixmapRequestDone causes a new
pixmap request to be started, thus overwriting mPixmapGenerationThread's
mCalcBoundingBox before it is read by the if in the next line.

Now signalPixmapRequestDone is called after the bounding box is saved,
so that new requests are started only after all data from
mPixmapGenerationThread have been saved.

BUG: 257370
REVIEW: 105600
remotes/origin/KDE/4.10
Fabio D'Urso 14 years ago
parent 99c4da2f9e
commit 5b12bf685d
  1. 2
      core/generator.cpp

@ -103,9 +103,9 @@ void GeneratorPrivate::pixmapGenerationFinished()
request->page()->setPixmap( request->id(), new QPixmap( QPixmap::fromImage( img ) ) );
const int pageNumber = request->page()->number();
q->signalPixmapRequestDone( request );
if ( mPixmapGenerationThread->calcBoundingBox() )
q->updatePageBoundingBox( pageNumber, mPixmapGenerationThread->boundingBox() );
q->signalPixmapRequestDone( request );
}
void GeneratorPrivate::textpageGenerationFinished()

Loading…
Cancel
Save