Commit 07a3b3e8 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Исправлен баг с позицией курсора после применения/отклонения всех изменений (баг 30859).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66221 954022d7-b5bf-4e40-9824-e11837661b57
parent ea2b8796
......@@ -15160,6 +15160,23 @@ CDocument.prototype.Get_Api = function()
{
return this.Api;
};
CDocument.prototype.private_CorrectDocumentPosition = function()
{
if (this.CurPos.ContentPos < 0 || this.CurPos.ContentPos >= this.Content.length)
{
this.Selection_Remove();
if (this.CurPos.ContentPos < 0)
{
this.CurPos.ContentPos = 0;
this.Content[0].Cursor_MoveToStartPos(false);
}
else
{
this.CurPos.ContentPos = this.Content.length - 1;
this.Content[this.CurPos.ContentPos].Cursor_MoveToEndPos(false);
}
}
};
//-----------------------------------------------------------------------------------
// Private
//-----------------------------------------------------------------------------------
......
......@@ -302,6 +302,7 @@ CDocument.prototype.Accept_AllRevisionChanges = function()
}
}
this.private_CorrectDocumentPosition();
this.Recalculate();
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
......@@ -323,6 +324,7 @@ CDocument.prototype.Reject_AllRevisionChanges = function()
}
}
this.private_CorrectDocumentPosition();
this.Recalculate();
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
......
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