mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-24 18:35:37 +00:00
Do not assume pdfdoc hints won't change
Since sometimes we even change the pdfdoc pointer itself ;-)
This was working previously by pure luck (read bug in poppler :D)
BUGS: 284464
FIXED-IN: 4.7.3
(cherry picked from commit eb705417fa
)
This commit is contained in:
parent
d41f230123
commit
fc58c9824f
|
@ -1118,17 +1118,13 @@ void PDFGenerator::addPages( KConfigDialog * )
|
|||
bool PDFGenerator::setDocumentRenderHints()
|
||||
{
|
||||
bool changed = false;
|
||||
static Poppler::Document::RenderHints oldhints = 0;
|
||||
const Poppler::Document::RenderHints oldhints = pdfdoc->renderHints();
|
||||
#define SET_HINT(hintname, hintdefvalue, hintflag) \
|
||||
{ \
|
||||
bool newhint = documentMetaData(hintname, hintdefvalue).toBool(); \
|
||||
if (newhint != (oldhints & hintflag)) \
|
||||
{ \
|
||||
pdfdoc->setRenderHint(hintflag, newhint); \
|
||||
if (newhint) \
|
||||
oldhints |= hintflag; \
|
||||
else \
|
||||
oldhints &= ~(int)hintflag; \
|
||||
changed = true; \
|
||||
} \
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue