Merge pull request '[pdf] Fix bug #79075' (#1765) from fix/pdf-bugs into hotfix/v9.2.1

Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/sdkjs/pulls/1765
This commit is contained in:
Oleg Korshul
2025-12-16 13:37:15 +00:00
2 changed files with 9 additions and 2 deletions

View File

@ -1065,7 +1065,8 @@
oCurData && oCurData.Read_FromAscCommentData(oCurAscCommData);
AscCommon.History.Add(new CChangesPDFAnnotCommentData(this, oCurData, oCommentData));
this.SetWasChanged(true, false);
if (oCommentData == null) {
this._replies.length = 0;
Asc.editor.sync_RemoveComment(this.GetId());
@ -1095,6 +1096,7 @@
oFirstCommToEdit.SetContents(oCommentData.m_sText);
}
let aRepliesToBeChanged = [];
let aReplyToDel = [];
let oReply, oReplyCommentData;
for (let i = 0; i < this._replies.length; i++) {
@ -1108,6 +1110,7 @@
if (oReplyCommentData) {
oReply.EditCommentData(oReplyCommentData);
aRepliesToBeChanged.push(oReply);
}
else {
aReplyToDel.push(oReply);
@ -1146,6 +1149,10 @@
}
}
aRepliesToBeChanged.forEach(function(reply) {
reply.SetWasChanged(true, false);
});
Asc.editor.sync_ChangeCommentData(this.GetId(), oCommentData);
};
CAnnotationBase.prototype.GetAscCommentData = function() {

View File

@ -673,7 +673,7 @@
// rendering
CDocument.prototype._paint= function() {
if (!this.canvas || !this.viewer.canInteract()) return;
if (!this.canvas) return;
if (this.isNeedResize()) {
this.resize();
}