summaryrefslogtreecommitdiffstats
path: root/src/pdfquick/PdfMultiPageView.qml
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2024-10-07 17:38:05 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2024-10-07 17:44:32 +0300
commit183d0101f41fd5a1007708a9416d1f12db31c1cb (patch)
tree969a5e91aef3b4c6805331e56c24fa6be8738f6b /src/pdfquick/PdfMultiPageView.qml
parent17e9f29577ea6573c7c348083ff510ee60c7e8cc (diff)
parent13381ca9e80578d038835c8a4dc609d75dfdec4c (diff)
Merge tag 'v6.2.10-lts' into tqtc/lts-6.2-opensourcev6.2.10-lts-lgpl6.2.10
Qt 6.2.10-lts release Conflicts solved: CHROMIUM_VERSION dependencies.yaml src/core/web_engine_context.cpp Change-Id: Ia54316ba0df3488d8e13c8f14fead1d90099519b
Diffstat (limited to 'src/pdfquick/PdfMultiPageView.qml')
-rw-r--r--src/pdfquick/PdfMultiPageView.qml13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/pdfquick/PdfMultiPageView.qml b/src/pdfquick/PdfMultiPageView.qml
index 0f62a229d..10683f55d 100644
--- a/src/pdfquick/PdfMultiPageView.qml
+++ b/src/pdfquick/PdfMultiPageView.qml
@@ -298,14 +298,7 @@ Item {
property point jumpLocationMargin: Qt.point(10, 10) // px away from viewport edges
anchors.fill: parent
anchors.leftMargin: 2
- model: modelInUse && root.document ? root.document.pageCount : 0
- // workaround to make TableView do scheduleRebuildTable(RebuildOption::All) in cases when forceLayout() doesn't
- property bool modelInUse: true
- function rebuild() {
- modelInUse = false
- modelInUse = true
- }
- // end workaround
+ model: root.document ? root.document.pageCount : 0
rowSpacing: 6
property real rotationNorm: Math.round((360 + (root.pageRotation % 360)) % 360)
property bool rot90: rotationNorm == 90 || rotationNorm == 270
@@ -528,8 +521,8 @@ Item {
// and don't force layout either, because positionViewAtCell() will do that
if (pageNavigator.jumping)
return
- // make TableView rebuild from scratch, because otherwise it doesn't know the delegates are changing size
- tableView.rebuild()
+ // page size changed: TableView needs to redo layout to avoid overlapping delegates or gaps between them
+ tableView.forceLayout()
const cell = tableView.cellAtPos(root.width / 2, root.height / 2)
const currentItem = tableView.itemAtCell(cell)
if (currentItem) {