summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2020-09-23 12:45:40 +0200
committerAndy Shaw <andy.shaw@qt.io>2020-09-23 19:38:42 +0200
commite2e249b8bb399ef7bcf6fe3be0b4f2fc9fa18182 (patch)
tree0b54d4affbb101a43d371d1a22fac4e7b86c1159 /src/plugins
parent0e1372d95939d3bd3889100fbec10036d7a83f1f (diff)
PDF: Load the PDF when jumping to the image otherwise it will fail
If the PDF is not loaded before it jumps to the image then it fails to jump to the specified page and ends up showing the first one. Pick-to: 5.15 Change-Id: I6061431e1fd9b743afaca3df0aec03dc6a1144bf Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/imageformats/pdf/qpdfiohandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/imageformats/pdf/qpdfiohandler.cpp b/src/plugins/imageformats/pdf/qpdfiohandler.cpp
index 98e4f4663..4f610935c 100644
--- a/src/plugins/imageformats/pdf/qpdfiohandler.cpp
+++ b/src/plugins/imageformats/pdf/qpdfiohandler.cpp
@@ -211,7 +211,7 @@ bool QPdfIOHandler::supportsOption(ImageOption option) const
bool QPdfIOHandler::jumpToImage(int frame)
{
qCDebug(qLcPdf) << Q_FUNC_INFO << frame;
- if (frame < 0 || frame >= m_doc.pageCount())
+ if (frame < 0 || frame >= imageCount())
return false;
m_page = frame;
return true;