mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-05 15:39:47 +00:00
due to a small bug in poppler-qt4, we cannot trust the document render hints
so, store ourselves the flags svn path=/trunk/KDE/kdegraphics/okular/; revision=757637
This commit is contained in:
parent
c06deaf9fc
commit
7e35a9c0cf
|
@ -1023,13 +1023,17 @@ bool PDFGenerator::setAAOptions()
|
|||
{
|
||||
bool changed = false;
|
||||
#ifdef HAVE_POPPLER_0_6
|
||||
Poppler::Document::RenderHints oldhints = pdfdoc->renderHints();
|
||||
static Poppler::Document::RenderHints oldhints = 0;
|
||||
#define SET_HINT(hintname, hintdefvalue, hintflag) \
|
||||
{ \
|
||||
bool newhint = documentMetaData(hintname, hintdefvalue).toBool(); \
|
||||
if (newhint != (oldhints & hintflag)) \
|
||||
{ \
|
||||
pdfdoc->setRenderHint(hintflag); \
|
||||
pdfdoc->setRenderHint(hintflag, newhint); \
|
||||
if (newhint) \
|
||||
oldhints |= hintflag; \
|
||||
else \
|
||||
oldhints &= ~(int)hintflag; \
|
||||
changed = true; \
|
||||
} \
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue