Commit 2fec0ced authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug with adding a new paragraphs in the main document. Fixed bug with...

Fixed bug with adding a new paragraphs in the main document. Fixed bug with loading reversed changes for client who made this changes. Added a test hotkey for Undo in fast collaborative.
parent b577e147
......@@ -715,7 +715,7 @@ CWordCollaborativeEditing.prototype.Undo = function()
oLogicDocument.DrawingDocument.EndTrackTable(null, true);
oLogicDocument.DrawingObjects.TurnOffCheckChartSelection();
for (var nIndex = arrReverseChanges.length - 1; nIndex >= 0; --nIndex)
for (var nIndex = 0, nCount = arrReverseChanges.length; nIndex < nCount; ++nIndex)
{
arrReverseChanges[nIndex].Load();
}
......
......@@ -6767,7 +6767,11 @@ CDocument.prototype.OnKeyDown = function(e)
}
else if (e.KeyCode == 90 && false === editor.isViewMode && true === e.CtrlKey) // Ctrl + Z - Undo
{
this.Document_Undo();
if (true === e.ShiftKey)
this.CollaborativeEditing.Undo();
else
this.Document_Undo();
bRetValue = keydownresult_PreventAll;
}
else if (e.KeyCode == 93 || 57351 == e.KeyCode /*в Opera такой код*/) // контекстное меню
......@@ -7401,7 +7405,7 @@ CDocument.prototype.Internal_Content_Add = function(Position, NewObject, bCheckT
NextObj = null;
this.private_RecalculateNumbering([NewObject]);
this.History.Add(new CChangesDocumentAddItem(this, Position, NewObject));
this.History.Add(new CChangesDocumentAddItem(this, Position, [NewObject]));
this.Content.splice(Position, 0, NewObject);
NewObject.Set_Parent(this);
NewObject.Set_DocumentNext(NextObj);
......
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