Merge pull request #15431 from Snuffleupagus/bug-1790552

Disable the editing-indicator, in the document title, during printing (bug 1790552, PR 15351 follow-up)
This commit is contained in:
Jonas Jenwald 2022-09-13 11:41:33 +02:00 committed by GitHub
commit 5a6cdffb4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -797,7 +797,9 @@ const PDFViewerApplication = {
// Embedded PDF viewers should not be changing their parent page's title.
return;
}
document.title = `${this._hasAnnotationEditors ? "* " : ""}${title}`;
const editorIndicator =
this._hasAnnotationEditors && !this.pdfRenderingQueue.printing;
document.title = `${editorIndicator ? "* " : ""}${title}`;
},
get _docFilename() {
@ -1844,6 +1846,8 @@ const PDFViewerApplication = {
);
this.printService = printService;
this.forceRendering();
// Disable the editor-indicator during printing (fixes bug 1790552).
this.setTitle();
printService.layout();
@ -1874,6 +1878,8 @@ const PDFViewerApplication = {
this.pdfDocument?.annotationStorage.resetModified();
}
this.forceRendering();
// Re-enable the editor-indicator after printing (fixes bug 1790552).
this.setTitle();
},
rotatePages(delta) {