diff options
author | Ken Moore <ken@ixsystems.com> | 2019-01-12 12:42:40 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2019-01-12 12:42:40 -0500 |
commit | 1c071b9948042fda648e924a0a7372b1522cd086 (patch) | |
tree | b967377310ca5145eec4a7242b8228f8df0ad768 /src-qt5/desktop-utils/lumina-pdf/Renderer-poppler.cpp | |
parent | Fix some icons in lumina-xconfig (diff) | |
download | lumina-1c071b9948042fda648e924a0a7372b1522cd086.tar.gz lumina-1c071b9948042fda648e924a0a7372b1522cd086.tar.bz2 lumina-1c071b9948042fda648e924a0a7372b1522cd086.zip |
Get lumina-pdf fixed up quite a bit:
1. Fix MUPDF compilation
2. Fix single-page, dual-column, and grid-view modes.
3. Fix presentation view mode
4. Fix page transitions with keyboard shortcuts.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-pdf/Renderer-poppler.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/Renderer-poppler.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/Renderer-poppler.cpp b/src-qt5/desktop-utils/lumina-pdf/Renderer-poppler.cpp index 6e5ff382..8f0755d4 100644 --- a/src-qt5/desktop-utils/lumina-pdf/Renderer-poppler.cpp +++ b/src-qt5/desktop-utils/lumina-pdf/Renderer-poppler.cpp @@ -154,13 +154,13 @@ void Renderer::renderPage(int pagenum, QSize DPI, int degrees) { } if (pagesStillLoading == 1) { - emit PageLoaded(); + emit PageLoaded(pagenum); } --pagesStillLoading; } -bool Renderer::isDoneLoading() { return pagesStillLoading == 0; } +bool Renderer::isDoneLoading(int page) { return imageCache.contains(page); } QList<TextData *> Renderer::searchDocument(QString text, bool matchCase) { QList<TextData *> results; @@ -177,9 +177,13 @@ QList<TextData *> Renderer::searchDocument(QString text, bool matchCase) { return results; } -QSize Renderer::imageSize(int pagenum) { return pages[pagenum].size(); } +QSize Renderer::imageSize(int pagenum) { + if(!imageCache.contains(pagenum)){ return QSize(); } + return pages[pagenum].size(); +} QImage Renderer::imageHash(int pagenum) { + if(!imageCache.contains(pagenum)){ return QImage(); } // while(pagesStillLoading > 0) { qDebug() << "pagesStillLoading!\n";} std::optional<QImage> cachedImage = imageCache.get(pagenum); |