Commit 79fb282c authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug #33824. Improved performance of an undo in fast collaboration.

parent 2a6e4a08
...@@ -902,14 +902,14 @@ CCollaborativeEditingBase.prototype.private_RestoreDocumentState = function(DocS ...@@ -902,14 +902,14 @@ CCollaborativeEditingBase.prototype.private_RestoreDocumentState = function(DocS
var _oChange = oChange.Copy(); var _oChange = oChange.Copy();
if (this.private_CommutateContentChanges(oContentChangesMap, oClass, _oChange, nPosition + nCount)) if (this.private_CommutateContentChanges(oContentChangesMap, oClass, _oChange, nPosition + nCount))
arrChanges.splice(0, 0, _oChange); arrChanges.push(_oChange);
} }
else else
{ {
var _oChange = oChange; // TODO: Тут надо бы сделать копирование var _oChange = oChange; // TODO: Тут надо бы сделать копирование
if (this.private_CommutatePropertyChanges(oClass, _oChange, nPosition + nCount)) if (this.private_CommutatePropertyChanges(oClass, _oChange, nPosition + nCount))
arrChanges.splice(0, 0, _oChange); arrChanges.push(_oChange);
} }
} }
...@@ -921,7 +921,7 @@ CCollaborativeEditingBase.prototype.private_RestoreDocumentState = function(DocS ...@@ -921,7 +921,7 @@ CCollaborativeEditingBase.prototype.private_RestoreDocumentState = function(DocS
{ {
var oReverseChange = arrChanges[nIndex].CreateReverseChange(); var oReverseChange = arrChanges[nIndex].CreateReverseChange();
if (oReverseChange) if (oReverseChange)
arrReverseChanges.splice(0, 0, oReverseChange); arrReverseChanges.push(oReverseChange);
} }
// Накатываем изменения в данном клиенте // Накатываем изменения в данном клиенте
......
...@@ -11782,7 +11782,7 @@ CTable.prototype.Set_ContentPosition = function(DocPos, Depth, Flag) ...@@ -11782,7 +11782,7 @@ CTable.prototype.Set_ContentPosition = function(DocPos, Depth, Flag)
_DocPos = null; _DocPos = null;
_Flag = 1; _Flag = 1;
} }
else if (CurRowRow > 0) else if (CurRow > 0)
{ {
CurRow--; CurRow--;
_DocPos = null; _DocPos = null;
......
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