Commit 77f2d91b authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug #33962. Fixed issue with undo in fast collaborative.

parent 2c1964a9
......@@ -762,19 +762,23 @@ CWordCollaborativeEditing.prototype.Undo = function()
var oHistory = AscCommon.History;
oHistory.CreateNewPointForCollectChanges();
var oDrawing;
for(var sId in mapDrawings){
if(mapDrawings.hasOwnProperty(sId)){
oDrawing = mapDrawings[sId];
if(!oDrawing.CheckCorrect()){
var oParentParagraph = oDrawing.Get_ParentParagraph();
oDrawing.Remove_FromDocument(false);
if(oParentParagraph){
mapParagraphs[oParentParagraph.Get_Id()] = oParentParagraph;
}
}
}
for (var sId in mapDrawings)
{
if (mapDrawings.hasOwnProperty(sId))
{
oDrawing = mapDrawings[sId];
if (!oDrawing.CheckCorrect())
{
var oParentParagraph = oDrawing.Get_ParentParagraph();
oDrawing.Remove_FromDocument(false);
if (oParentParagraph)
{
mapParagraphs[oParentParagraph.Get_Id()] = oParentParagraph;
}
}
}
}
}
for (var sId in mapDocumentContents)
{
var oDocumentContent = mapDocumentContents[sId];
......@@ -798,6 +802,7 @@ CWordCollaborativeEditing.prototype.Undo = function()
arrReverseChanges.push(oHistoryPoint.Items[nIndex].Data);
}
oHistory.Remove_LastPoint();
this.Clear_DCChanges();
var oBinaryWriter = AscCommon.History.BinaryWriter;
var aSendingChanges = [];
......
......@@ -5334,7 +5334,6 @@ Paragraph.prototype =
if ((para_Hyperlink === CurElement.Type || para_Math === CurElement.Type || para_Field === CurElement.Type) && true === CurElement.Is_Empty() && true !== CurElement.Is_CheckingNearestPos())
{
this.Internal_Content_Remove(CurPos);
CurPos++;
}
else if (para_Comment === CurElement.Type && false === CurElement.Start)
{
......
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