Commit 2aa4d399 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

add History.UndoRedoPrepare, History.UndoRedoEnd....

add History.UndoRedoPrepare, History.UndoRedoEnd. trigger("updateSheetViewSettings"), trigger("asc_onUpdateTabColor" перенесены в History.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56547 954022d7-b5bf-4e40-9824-e11837661b57
parent f3ba8db6
This diff is collapsed.
......@@ -1647,7 +1647,7 @@ Workbook.prototype.DeserializeHistory = function(aChanges, fCallback){
History.SetSelectionRedo(null);
var oHistoryPositions = null;//нужен самый последний historyitem_Workbook_SheetPositions
var oRedoObjectParam = new Asc.RedoObjectParam();
History.RedoPrepare(oRedoObjectParam);
History.UndoRedoPrepare(oRedoObjectParam, false);
for(var i = 0, length = aChanges.length; i < length; ++i)
{
var sChange = aChanges[i];
......@@ -1673,7 +1673,7 @@ Workbook.prototype.DeserializeHistory = function(aChanges, fCallback){
if(null != oHistoryPositions)
History.RedoAdd(oRedoObjectParam, oHistoryPositions.oClass, oHistoryPositions.nActionType, oHistoryPositions.nSheetId, oHistoryPositions.oRange, oHistoryPositions.oData);
History.RedoEnd(null, oRedoObjectParam);
History.UndoRedoEnd(null, oRedoObjectParam, false);
oThis.bCollaborativeChanges = false;
History.Clear();
if(null != fCallback)
......@@ -2117,7 +2117,7 @@ Woorksheet.prototype.setTabColor=function(color){
new UndoRedoData_FromTo(this.sheetPr.TabColor ? this.sheetPr.TabColor.clone() : null, color ? color.clone() : null));
this.sheetPr.TabColor = color;
if (!this.workbook.bUndoChanges && !this.workbook.bRedoChanges)
this.workbook.handlers.trigger("asc_onUpdateTabColor", this.getIndex());
};
Woorksheet.prototype.renameWsToCollaborate=function(name){
......@@ -2218,6 +2218,7 @@ Woorksheet.prototype.setSheetViewSettings = function (options) {
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_SetViewSettings, this.getId(), null, new UndoRedoData_FromTo(current, options.clone()));
this.sheetViews[0].setSettings(options);
if (!this.workbook.bUndoChanges && !this.workbook.bRedoChanges)
this.workbook.handlers.trigger("asc_onUpdateSheetViewSettings");
};
Woorksheet.prototype.getRowsCount=function(){
......
......@@ -1159,10 +1159,11 @@
this.bIsOn = false;
this.bIsReInit = false;
this.bChangeWorksheetUpdate = false;
this.oChangeWorksheetUpdate = {};
this.bUpdateWorksheetByModel = false;
this.bOnSheetsChanged = false;
this.oOnUpdateTabColor = {};
this.oOnUpdateSheetViewSettings = {};
}
/** @constructor */
......
......@@ -3297,7 +3297,7 @@
this.draw();
// Эвент на обновление
if (isUpdate)
if (isUpdate && !this.model.workbook.bUndoChanges && !this.model.workbook.bRedoChanges)
this.handlers.trigger("updateSheetViewSettings");
};
......
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