Commit 3d42b2ec authored by SergeyLuzyanin's avatar SergeyLuzyanin

fix Bug 35476

parent eb1f8ebc
...@@ -1902,10 +1902,11 @@ CPresentation.prototype = ...@@ -1902,10 +1902,11 @@ CPresentation.prototype =
addChart: function(binary) addChart: function(binary)
{ {
var _this = this; var _this = this;
_this.Slides[_this.CurPage] && _this.Slides[_this.CurPage].graphicObjects.checkSelectedObjectsAndCallback(function() // _this.Slides[_this.CurPage] && _this.Slides[_this.CurPage].graphicObjects.checkSelectedObjectsAndCallback(function()
{ // {
History.Create_NewPoint(AscDFH.historydescription_Presentation_AddChart);
editor.WordControl.Thumbnails.SetFocusElement(FOCUS_OBJECT_MAIN); editor.WordControl.Thumbnails.SetFocusElement(FOCUS_OBJECT_MAIN);
this.FocusOnNotes = false; _this.FocusOnNotes = false;
var Image = _this.Slides[_this.CurPage].graphicObjects.getChartSpace2(binary, null); var Image = _this.Slides[_this.CurPage].graphicObjects.getChartSpace2(binary, null);
Image.setParent(_this.Slides[_this.CurPage]); Image.setParent(_this.Slides[_this.CurPage]);
Image.addToDrawingObjects(); Image.addToDrawingObjects();
...@@ -1913,9 +1914,10 @@ CPresentation.prototype = ...@@ -1913,9 +1914,10 @@ CPresentation.prototype =
Image.spPr.xfrm.setOffY((_this.Slides[_this.CurPage].Height - Image.spPr.xfrm.extY)/2); Image.spPr.xfrm.setOffY((_this.Slides[_this.CurPage].Height - Image.spPr.xfrm.extY)/2);
_this.Slides[_this.CurPage].graphicObjects.resetSelection(); _this.Slides[_this.CurPage].graphicObjects.resetSelection();
_this.Slides[_this.CurPage].graphicObjects.selectObject(Image, 0); _this.Slides[_this.CurPage].graphicObjects.selectObject(Image, 0);
_this.Recalculate();
_this.Document_UpdateInterfaceState(); _this.Document_UpdateInterfaceState();
this.CheckEmptyPlaceholderNotes(); _this.CheckEmptyPlaceholderNotes();
}, [], false, AscDFH.historydescription_Presentation_AddChart); // }, [], false, AscDFH.historydescription_Presentation_AddChart);
}, },
RemoveSelection: function(bNoResetChartSelection) RemoveSelection: function(bNoResetChartSelection)
......
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