Commit 3d3e0fda authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

не приходит setDocumentModified после History.Clear

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57817 954022d7-b5bf-4e40-9824-e11837661b57
parent 2e62836b
...@@ -175,7 +175,7 @@ function CHistory(workbook) ...@@ -175,7 +175,7 @@ function CHistory(workbook)
this.SavePoint = null; this.SavePoint = null;
this.Points = []; this.Points = [];
this.CurPoint = null; this.CurPoint = null;
this.IsModify = false; this.IsModify = null;
this.TurnOffHistory = 0; this.TurnOffHistory = 0;
this.Transaction = 0; this.Transaction = 0;
this.LocalChange = false;//если true все добавленный изменения не пойдут в совместное редактирование. this.LocalChange = false;//если true все добавленный изменения не пойдут в совместное редактирование.
...@@ -192,7 +192,7 @@ CHistory.prototype.Clear = function() ...@@ -192,7 +192,7 @@ CHistory.prototype.Clear = function()
this.SavePoint = null; this.SavePoint = null;
this.Points.length = 0; this.Points.length = 0;
this.CurPoint = null; this.CurPoint = null;
this.IsModify = false; this.IsModify = null;
this.TurnOffHistory = 0; this.TurnOffHistory = 0;
this.Transaction = 0; this.Transaction = 0;
this.LoadFonts = {}; this.LoadFonts = {};
...@@ -678,9 +678,10 @@ CHistory.prototype._sendCanUndoRedo = function() ...@@ -678,9 +678,10 @@ CHistory.prototype._sendCanUndoRedo = function()
{ {
this.workbook.handlers.trigger("setCanUndo", this.Can_Undo()); this.workbook.handlers.trigger("setCanUndo", this.Can_Undo());
this.workbook.handlers.trigger("setCanRedo", this.Can_Redo()); this.workbook.handlers.trigger("setCanRedo", this.Can_Redo());
if(this.IsModify != this.Is_Modified()) var IsModify = this.Is_Modified();
if(this.IsModify != IsModify)
{ {
this.IsModify = !this.IsModify; this.IsModify = IsModify;
this.workbook.handlers.trigger("setDocumentModified", this.IsModify); this.workbook.handlers.trigger("setDocumentModified", this.IsModify);
} }
}; };
...@@ -777,9 +778,10 @@ CHistory.prototype.Save = function() ...@@ -777,9 +778,10 @@ CHistory.prototype.Save = function()
this.SavePoint = this.CurPoint; this.SavePoint = this.CurPoint;
else if(this.Index >= 0 && this.Index < this.Points.length) else if(this.Index >= 0 && this.Index < this.Points.length)
this.SavePoint = this.Points[this.Index]; this.SavePoint = this.Points[this.Index];
if(true == this.IsModify) var IsModify = this.Is_Modified();
if(this.IsModify != IsModify)
{ {
this.IsModify = !this.IsModify; this.IsModify = IsModify;
this.workbook.handlers.trigger("setDocumentModified", this.IsModify); this.workbook.handlers.trigger("setDocumentModified", this.IsModify);
} }
}; };
......
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