Commit f5be3732 authored by SergeyLuzyanin's avatar SergeyLuzyanin

fix Bug 35257

parent bd103299
...@@ -4582,19 +4582,19 @@ Woorksheet.prototype.isApplyFilterBySheet = function(){ ...@@ -4582,19 +4582,19 @@ Woorksheet.prototype.isApplyFilterBySheet = function(){
return null; return null;
}; };
Woorksheet.prototype.removeSparklines = function (range) { Woorksheet.prototype.removeSparklines = function (range) {
for (var i = 0; i < this.aSparklineGroups.length; ++i) { for (var i = this.aSparklineGroups.length - 1; i > -1 ; --i) {
if (this.aSparklineGroups[i].remove(range)) { if (this.aSparklineGroups[i].remove(range)) {
History.Add(this.aSparklineGroups[i], {Type: AscCH.historyitem_Sparkline_RemoveSparkline, oldPr: null, newPr: null}); History.Add(new AscDFH.CChangesDrawingsSparklinesRemove(this.aSparklineGroups[i]));
this.aSparklineGroups.splice(i--, 1); this.aSparklineGroups.splice(i, 1);
} }
} }
}; };
Woorksheet.prototype.removeSparklineGroups = function (range) { Woorksheet.prototype.removeSparklineGroups = function (range) {
for (var i = 0; i < this.aSparklineGroups.length; ++i) { for (var i = this.aSparklineGroups.length - 1; i > -1 ; --i) {
if (-1 !== this.aSparklineGroups[i].intersectionSimple(range)) { if (-1 !== this.aSparklineGroups[i].intersectionSimple(range)) {
History.Add(this.aSparklineGroups[i], {Type: AscCH.historyitem_Sparkline_RemoveSparkline, oldPr: null, newPr: null}); History.Add(new AscDFH.CChangesDrawingsSparklinesRemove(this.aSparklineGroups[i]));
this.aSparklineGroups.splice(i--, 1); this.aSparklineGroups.splice(i, 1);
} }
} }
}; };
Woorksheet.prototype.insertSparklineGroup = function (sparklineGroup) { Woorksheet.prototype.insertSparklineGroup = function (sparklineGroup) {
......
...@@ -4733,11 +4733,7 @@ RangeDataManager.prototype = { ...@@ -4733,11 +4733,7 @@ RangeDataManager.prototype = {
--i; --i;
} }
} }
var bRemove = (0 === this.arrSparklines.length);
var bRemove = 0 === this.arrSparklines.length;
if (bRemove) {
History.Add(new AscDFH.CChangesDrawingsSparklinesRemove(this));
}
return bRemove; return bRemove;
}; };
sparklineGroup.prototype.getLocationRanges = function (onlySingle) { sparklineGroup.prototype.getLocationRanges = function (onlySingle) {
......
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