Commit f230b2c8 authored by GoshaZotov's avatar GoshaZotov

startAction/endAction if add new format table

parent 9022ee67
...@@ -11995,6 +11995,7 @@ ...@@ -11995,6 +11995,7 @@
} }
var t = this; var t = this;
var api = window["Asc"]["editor"];
var ar = this.model.selectionRange.getLast().clone(); var ar = this.model.selectionRange.getLast().clone();
var isChangeAutoFilterToTablePart = function (addFormatTableOptionsObj) { var isChangeAutoFilterToTablePart = function (addFormatTableOptionsObj) {
...@@ -12045,21 +12046,28 @@ ...@@ -12045,21 +12046,28 @@
t._isLockedCells(filterRange, /*subType*/null, addFilterCallBack); t._isLockedCells(filterRange, /*subType*/null, addFilterCallBack);
} else//ADD } else//ADD
{ {
var addFilterCallBack = function () { var addFilterCallBack = function () {
History.Create_NewPoint(); History.Create_NewPoint();
History.StartTransaction(); History.StartTransaction();
t.model.autoFilters.addAutoFilter(styleName, ar, addFormatTableOptionsObj); if(null !== styleName)
api.sync_StartAction(Asc.c_oAscAsyncActionType.BlockInteraction, Asc.c_oAscAsyncAction.SlowOperation);
//updates //add to model
if (styleName && addNameColumn) { t.model.autoFilters.addAutoFilter(styleName, ar, addFormatTableOptionsObj);
t.setSelection(filterRange);
}
t._onUpdateFormatTable(filterRange, !!(styleName), true);
History.EndTransaction(); //updates
}; if (styleName && addNameColumn) {
t.setSelection(filterRange);
}
t._onUpdateFormatTable(filterRange, !!(styleName), true);
if(null !== styleName)
api.sync_EndAction(Asc.c_oAscAsyncActionType.BlockInteraction, Asc.c_oAscAsyncAction.SlowOperation);
History.EndTransaction();
};
if (styleName === null) { if (styleName === null) {
addFilterCallBack(); addFilterCallBack();
......
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