summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pdfquick/qml/PdfScrollablePageView.qml2
-rw-r--r--src/pdfquick/qquickpdfselection.cpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/pdfquick/qml/PdfScrollablePageView.qml b/src/pdfquick/qml/PdfScrollablePageView.qml
index 9432f7be7..1e692324f 100644
--- a/src/pdfquick/qml/PdfScrollablePageView.qml
+++ b/src/pdfquick/qml/PdfScrollablePageView.qml
@@ -264,7 +264,7 @@ Flickable {
anchors.fill: parent
document: root.document
page: navigationStack.currentPage
- renderScale: image.pageScale
+ renderScale: image.pageScale == 0 ? 1.0 : image.pageScale
fromPoint: textSelectionDrag.centroid.pressPosition
toPoint: textSelectionDrag.centroid.position
hold: !textSelectionDrag.active && !mouseClickHandler.pressed
diff --git a/src/pdfquick/qquickpdfselection.cpp b/src/pdfquick/qquickpdfselection.cpp
index bc4b7a765..0f75c44ac 100644
--- a/src/pdfquick/qquickpdfselection.cpp
+++ b/src/pdfquick/qquickpdfselection.cpp
@@ -396,6 +396,11 @@ qreal QQuickPdfSelection::renderScale() const
void QQuickPdfSelection::setRenderScale(qreal scale)
{
+ if (qFuzzyIsNull(scale)) {
+ qWarning() << "PdfSelection.renderScale cannot be set to 0.";
+ return;
+ }
+
if (qFuzzyCompare(scale, m_renderScale))
return;