Merge pull request #12265 from Snuffleupagus/issue-12262
Don't warn when navigating away from a modified form, if printing has occurred (issue 12262)
This commit is contained in:
commit
364b9cc802
@ -58,7 +58,7 @@ class AnnotationStorage {
|
|||||||
*/
|
*/
|
||||||
setValue(key, value) {
|
setValue(key, value) {
|
||||||
if (this._storage.get(key) !== value) {
|
if (this._storage.get(key) !== value) {
|
||||||
this.setModified();
|
this._setModified();
|
||||||
}
|
}
|
||||||
this._storage.set(key, value);
|
this._storage.set(key, value);
|
||||||
}
|
}
|
||||||
@ -74,7 +74,10 @@ class AnnotationStorage {
|
|||||||
return this._storage.size;
|
return this._storage.size;
|
||||||
}
|
}
|
||||||
|
|
||||||
setModified() {
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
_setModified() {
|
||||||
if (!this._modified) {
|
if (!this._modified) {
|
||||||
this._modified = true;
|
this._modified = true;
|
||||||
if (typeof this.onSetModified === "function") {
|
if (typeof this.onSetModified === "function") {
|
||||||
|
@ -2544,7 +2544,9 @@ class WorkerTransport {
|
|||||||
filename: this._fullReader ? this._fullReader.filename : null,
|
filename: this._fullReader ? this._fullReader.filename : null,
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
annotationStorage.resetModified();
|
if (annotationStorage) {
|
||||||
|
annotationStorage.resetModified();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1687,6 +1687,10 @@ const PDFViewerApplication = {
|
|||||||
if (this.printService) {
|
if (this.printService) {
|
||||||
this.printService.destroy();
|
this.printService.destroy();
|
||||||
this.printService = null;
|
this.printService = null;
|
||||||
|
|
||||||
|
if (this.pdfDocument) {
|
||||||
|
this.pdfDocument.annotationStorage.resetModified();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.forceRendering();
|
this.forceRendering();
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user