Commit 082c3d89 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Сделано, чтобы пустые точки удалялись из истории при принятии/отклонении изменений (баг 30862).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66348 954022d7-b5bf-4e40-9824-e11837661b57
parent 18d46876
...@@ -263,6 +263,9 @@ CDocument.prototype.Accept_RevisionChangesBySelection = function() ...@@ -263,6 +263,9 @@ CDocument.prototype.Accept_RevisionChangesBySelection = function()
{ {
this.Create_NewHistoryPoint(historydescription_Document_AcceptRevisionChangesBySelection); this.Create_NewHistoryPoint(historydescription_Document_AcceptRevisionChangesBySelection);
this.Accept_RevisionChanges(undefined, false); this.Accept_RevisionChanges(undefined, false);
if (true === this.History.Is_LastPointEmpty())
this.History.Remove_LastPoint();
} }
} }
...@@ -281,6 +284,9 @@ CDocument.prototype.Reject_RevisionChangesBySelection = function() ...@@ -281,6 +284,9 @@ CDocument.prototype.Reject_RevisionChangesBySelection = function()
{ {
this.Create_NewHistoryPoint(historydescription_Document_AcceptRevisionChangesBySelection); this.Create_NewHistoryPoint(historydescription_Document_AcceptRevisionChangesBySelection);
this.Reject_RevisionChanges(undefined, false); this.Reject_RevisionChanges(undefined, false);
if (true === this.History.Is_LastPointEmpty())
this.History.Remove_LastPoint();
} }
} }
...@@ -301,6 +307,13 @@ CDocument.prototype.Accept_AllRevisionChanges = function() ...@@ -301,6 +307,13 @@ CDocument.prototype.Accept_AllRevisionChanges = function()
LogicDoc.Accept_RevisionChanges(undefined, true); LogicDoc.Accept_RevisionChanges(undefined, true);
} }
} }
if (true === this.History.Is_LastPointEmpty())
{
this.History.Remove_LastPoint();
return;
}
this.Selection_Remove(); this.Selection_Remove();
this.private_CorrectDocumentPosition(); this.private_CorrectDocumentPosition();
this.Recalculate(); this.Recalculate();
...@@ -323,6 +336,13 @@ CDocument.prototype.Reject_AllRevisionChanges = function() ...@@ -323,6 +336,13 @@ CDocument.prototype.Reject_AllRevisionChanges = function()
LogicDoc.Reject_RevisionChanges(undefined, true); LogicDoc.Reject_RevisionChanges(undefined, true);
} }
} }
if (true === this.History.Is_LastPointEmpty())
{
this.History.Remove_LastPoint();
return;
}
this.Selection_Remove(); this.Selection_Remove();
this.private_CorrectDocumentPosition(); this.private_CorrectDocumentPosition();
this.Recalculate(); this.Recalculate();
......
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