[SSE] Clean cell when change formula in formatted table total row.

This commit is contained in:
Julia Radzhabova 2020-06-30 22:16:55 +03:00
parent 7548ee9683
commit d1e531b6dd
2 changed files with 6 additions and 3 deletions

View file

@ -509,7 +509,7 @@ define([
onInsFunction: function(item) { onInsFunction: function(item) {
var controller = this.getApplication().getController('FormulaDialog'); var controller = this.getApplication().getController('FormulaDialog');
if (controller && this.api) { if (controller && this.api) {
controller.showDialog(); controller.showDialog(undefined, item.value==Asc.ETotalsRowFunction.totalrowfunctionCustom);
} }
}, },

View file

@ -99,7 +99,7 @@ define([
if (autocomplete) if (autocomplete)
this.api.asc_insertInCell(func.name, Asc.c_oAscPopUpSelectorType.Func, !!autocomplete); this.api.asc_insertInCell(func.name, Asc.c_oAscPopUpSelectorType.Func, !!autocomplete);
else else
this.api.asc_startWizard(func.name); this.api.asc_startWizard(func.name, this._cleanCell);
!autocomplete && this.updateLast10Formulas(func.origin); !autocomplete && this.updateLast10Formulas(func.origin);
} }
} }
@ -133,6 +133,7 @@ define([
}); });
this.formulas.on({ this.formulas.on({
'hide': function () { 'hide': function () {
me._cleanCell = undefined; // _cleanCell - clean cell when change formula in formatted table total row
me.api.asc_enableKeyEvents(true); me.api.asc_enableKeyEvents(true);
} }
}); });
@ -212,7 +213,7 @@ define([
return null; return null;
}, },
showDialog: function (group) { showDialog: function (group, clean) {
if (this.formulas) { if (this.formulas) {
if ( this.needUpdateFormula ) { if ( this.needUpdateFormula ) {
this.needUpdateFormula = false; this.needUpdateFormula = false;
@ -222,6 +223,7 @@ define([
} }
} }
this._formulagroup = group; this._formulagroup = group;
this._cleanCell = clean;
this.api.asc_startWizard(); this.api.asc_startWizard();
} }
}, },
@ -249,6 +251,7 @@ define([
} }
} }
})).show(); })).show();
this._cleanCell = undefined;
} else } else
this.formulas.show(this._formulagroup); this.formulas.show(this._formulagroup);
this._formulagroup = undefined; this._formulagroup = undefined;