summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-02-25 22:37:09 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2020-02-26 15:40:16 +0100
commit8091944ae8ccfb4e0b3e7518912802c9c75704d0 (patch)
tree6e1291b4f9732b7899e006e49cf90142345479e7
parentdbf1be9c98337701b18dae66892f645c51b8bd22 (diff)
PdfMultiPageView: highlight current search result when tapped in list
Change-Id: Ib0a1aeac28350c8705899ab799ce776e6764b306 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r--src/pdf/quick/qml/PdfMultiPageView.qml3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pdf/quick/qml/PdfMultiPageView.qml b/src/pdf/quick/qml/PdfMultiPageView.qml
index cb4419b4d..d50763a64 100644
--- a/src/pdf/quick/qml/PdfMultiPageView.qml
+++ b/src/pdf/quick/qml/PdfMultiPageView.qml
@@ -84,6 +84,7 @@ Item {
if (zoom > 0)
root.renderScale = zoom
navigationStack.push(page, location, zoom)
+ searchModel.currentPage = page
}
// page scaling
@@ -366,6 +367,6 @@ Item {
PdfSearchModel {
id: searchModel
document: root.document === undefined ? null : root.document
- onCurrentPageChanged: root.goToPage(currentPage)
+ onCurrentPageChanged: if (currentPage != navigationStack.currentPage) root.goToPage(currentPage)
}
}