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:
Calixte Denizet 2026-04-07 15:48:23 +02:00
parent f8d7c20a1a
commit 1b2e98f3ce
No known key found for this signature in database
GPG Key ID: 0C5442631EE0691F

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();