Commit 60e8577f authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug #34181

parent c13fc8b2
......@@ -1046,13 +1046,6 @@ CCollaborativeEditingBase.prototype.private_RestoreDocumentState = function(DocS
oParagraph.Correct_Content();
oParagraph.CheckParaEnd();
}
var oHistoryPoint = oHistory.Points[oHistory.Points.length - 1];
for (var nIndex = 0, nCount = oHistoryPoint.Items.length; nIndex < nCount; ++nIndex)
{
arrReverseChanges.push(oHistoryPoint.Items[nIndex].Data);
}
oHistory.Remove_LastPoint();
this.Clear_DCChanges();
var oBinaryWriter = AscCommon.History.BinaryWriter;
var aSendingChanges = [];
......@@ -1072,6 +1065,22 @@ CCollaborativeEditingBase.prototype.private_RestoreDocumentState = function(DocS
oChange.Set_FromUndoRedo(oChangeClass, oReverseChange, {Pos : nBinaryPos, Len : nBinaryLen});
aSendingChanges.push(oChange.m_pData);
}
var oHistoryPoint = oHistory.Points[oHistory.Points.length - 1];
for (var nIndex = 0, nCount = oHistoryPoint.Items.length; nIndex < nCount; ++nIndex)
{
var oReverseChange = oHistoryPoint.Items[nIndex].Data;
var oChangeClass = oReverseChange.GetClass();
var oChange = new AscCommon.CCollaborativeChanges();
oChange.Set_FromUndoRedo(oChangeClass, oReverseChange, {Pos : oHistoryPoint.Items[nIndex].Binary.Pos, Len : oHistoryPoint.Items[nIndex].Binary.Len});
aSendingChanges.push(oChange.m_pData);
arrReverseChanges.push(oHistoryPoint.Items[nIndex].Data);
}
oHistory.Remove_LastPoint();
this.Clear_DCChanges();
editor.CoAuthoringApi.saveChanges(aSendingChanges, null, null);
this.private_RestoreDocumentState(DocState);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment