Merge pull request #21059 from calixteman/bug2028193

Make sure the thumbnails positions are recomputed after a structural change but after a reflow has been done (bug 2028193)
This commit is contained in:
calixteman 2026-04-07 17:02:07 +02:00 committed by GitHub
commit d6afffe8f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -707,7 +707,7 @@ class PDFThumbnailViewer {
pagesMapper.movePages(selectedPages, pagesToMove, newIndex);
this.#updateCurrentPage(this.#updateThumbnails(currentPageNumber));
this.#computeThumbnailsPosition();
this.#thumbnailsPositions = null;
selectedPages.clear();
this.#pageNumberToRemove = NaN;
@ -920,7 +920,7 @@ class PDFThumbnailViewer {
pagesMapper.pastePages(index);
this.#updateThumbnails(currentPageNumber);
this.#updateCurrentPage(index + 1, /* forceFocus = */ true);
this.#computeThumbnailsPosition();
this.#thumbnailsPositions = null;
this.eventBus.dispatch("pagesedited", {
source: this,
@ -956,6 +956,8 @@ class PDFThumbnailViewer {
pagesMapper.deletePages(pagesToDelete);
this.#updateCurrentPage(this.#updateThumbnails(currentPageNumber));
this.#thumbnailsPositions = null;
selectedPages.clear();
this.#updateMenuEntries();