summaryrefslogtreecommitdiffstats
path: root/src/pdf/quick/qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdf/quick/qml')
-rw-r--r--src/pdf/quick/qml/PdfMultiPageView.qml4
-rw-r--r--src/pdf/quick/qml/PdfPageView.qml3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/pdf/quick/qml/PdfMultiPageView.qml b/src/pdf/quick/qml/PdfMultiPageView.qml
index 28436b90d..be41153b6 100644
--- a/src/pdf/quick/qml/PdfMultiPageView.qml
+++ b/src/pdf/quick/qml/PdfMultiPageView.qml
@@ -111,7 +111,7 @@ Item {
property bool rot90: rotationModulus > 45 && rotationModulus < 135
property size firstPagePointSize: document.pagePointSize(0)
onCurrentIndexChanged: {
- navigationStack.currentPage = currentIndex
+ navigationStack.push(currentIndex, Qt.point(0, 0), root.renderScale)
root.currentPageReallyChanged(currentIndex)
}
delegate: Rectangle {
@@ -244,7 +244,7 @@ Item {
}
PdfNavigationStack {
id: navigationStack
- onCurrentPageJumped: listView.currentIndex = page
+ onJumped: listView.currentIndex = page
onCurrentPageChanged: root.currentPageReallyChanged(navigationStack.currentPage)
}
}
diff --git a/src/pdf/quick/qml/PdfPageView.qml b/src/pdf/quick/qml/PdfPageView.qml
index cf287ecf7..d03e9dc9d 100644
--- a/src/pdf/quick/qml/PdfPageView.qml
+++ b/src/pdf/quick/qml/PdfPageView.qml
@@ -57,6 +57,7 @@ Rectangle {
property alias forwardEnabled: navigationStack.forwardAvailable
function back() { navigationStack.back() }
function forward() { navigationStack.forward() }
+ function goToPage(page) { navigationStack.push(page, Qt.point(0, 0), renderScale) }
signal currentPageReallyChanged(page: int)
property real __pageScale: image.paintedWidth / document.pagePointSize(navigationStack.currentPage).width
@@ -203,7 +204,7 @@ Rectangle {
cursorShape: Qt.PointingHandCursor
onClicked: {
if (page >= 0)
- navigationStack.currentPage = page
+ navigationStack.push(page, Qt.point(0, 0), paper.renderScale)
else
Qt.openUrlExternally(url)
}