-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105600/
-----------------------------------------------------------

Review request for Okular and Albert Astals Cid.


Description
-------

This patch fixes a bug that causes the extraction of a wrong bounding box.

The issue is that, 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.
If the current request had mCalcBoundingBox disabled and the next request 
enables it, GeneratorPrivate::pixmapGenerationFinished() will think that the 
current request has mCalcBoundingBox enabled and will set the bounding box to 
whatever value mPixmapGenerationThread->boundingBox() returns, ie the value 
left by the last request that actually calculated the bounding box (usually for 
a different page).
On the other hand, if the current request has mCalcBoundingBox enabled and the 
next request disables it, the if will not be taken and the calculated bounding 
box is discarded.

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

Note: This patch does not reintroduce the issue fixed by 
9ea54d72980715fd36927b4d7e7f432091787088, because I'm updating the bounding box 
after calling Page::setPixmap.


This addresses bugs 257370, 292680 and 303622.
    http://bugs.kde.org/show_bug.cgi?id=257370
    http://bugs.kde.org/show_bug.cgi?id=292680
    http://bugs.kde.org/show_bug.cgi?id=303622


Diffs
-----

  core/generator.cpp 0073943 

Diff: http://git.reviewboard.kde.org/r/105600/diff/


Testing
-------

Bugs 257370, 292680, 303622 seem to be fixed


Thanks,

Fabio D'Urso

_______________________________________________
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel

Reply via email to