Commit 7f2f670e authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

исправила баги, связанные c undo/redo

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49002 954022d7-b5bf-4e40-9824-e11837661b57
parent 62b55499
...@@ -3769,6 +3769,14 @@ CMathComposition.prototype = ...@@ -3769,6 +3769,14 @@ CMathComposition.prototype =
if(TEST) if(TEST)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
var start = this.SelectContent.selection.startPos,
end = this.SelectContent.selection.endPos;
var Pos;
if(start !== end)
Pos = start < end ? start: end;
else
Pos = this.SelectContent.CurPos;
} }
this.ClearSelect(); this.ClearSelect();
...@@ -3783,7 +3791,6 @@ CMathComposition.prototype = ...@@ -3783,7 +3791,6 @@ CMathComposition.prototype =
{ {
if(TEST) if(TEST)
{ {
var Pos = this.CurrentContent.CurPos + 1;
History.Add(this.CurrentContent, {Type: historyitem_Math_RemoveItem, Items: result.items, Pos: Pos}); History.Add(this.CurrentContent, {Type: historyitem_Math_RemoveItem, Items: result.items, Pos: Pos});
} }
...@@ -3930,7 +3937,11 @@ CMathComposition.prototype = ...@@ -3930,7 +3937,11 @@ CMathComposition.prototype =
this.SelectContent.selection.active = false; this.SelectContent.selection.active = false;
} }
else else
{
this.SelectContent.setStart_Selection(State.Select.StartSelect - 1);
this.SelectContent.selection.active = false;
this.UpdateCursor(); this.UpdateCursor();
}
}, },
/*Undo: function(Data) /*Undo: function(Data)
{ {
...@@ -3974,6 +3985,9 @@ CMathComposition.prototype = ...@@ -3974,6 +3985,9 @@ CMathComposition.prototype =
UpdateCursor: function() UpdateCursor: function()
{ {
this.CurrentContent.update_Cursor(); this.CurrentContent.update_Cursor();
if( this.SelectContent.selection.startPos !== this.SelectContent.selection.endPos)
this.HideCursor();
else
this.ShowCursor(); this.ShowCursor();
}, },
GetPrpSelectContent: function() GetPrpSelectContent: function()
......
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