Commit f230b2c8 authored by GoshaZotov's avatar GoshaZotov

startAction/endAction if add new format table

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