lab.nexedi.com will be down from Thursday, 20 March 2025, 07:30:00 UTC for a duration of approximately 2 hours

Commit 5fd3be9e authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

правка бага с неработающим Undo при смене типа или стиля диаграммы из правой панели.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51330 954022d7-b5bf-4e40-9824-e11837661b57
parent d717c660
...@@ -365,7 +365,7 @@ CGraphicObjects.prototype = ...@@ -365,7 +365,7 @@ CGraphicObjects.prototype =
if(!isRealObject(chart_props)) if(!isRealObject(chart_props))
{ {
chart_props = {fromGroup: true}; chart_props = {fromGroup: true};
chart_props.ChartProperties = c_obj.chart; chart_props.ChartProperties = new asc_CChart(c_obj.chart);
} }
else else
{ {
...@@ -473,7 +473,7 @@ CGraphicObjects.prototype = ...@@ -473,7 +473,7 @@ CGraphicObjects.prototype =
{ {
chart_props = {}; chart_props = {};
chart_props = s_arr[i].Get_Props(null); chart_props = s_arr[i].Get_Props(null);
chart_props.ChartProperties = c_obj.chart; chart_props.ChartProperties = new asc_CChart(c_obj.chart);
} }
else else
{ {
......
...@@ -120,8 +120,10 @@ CChartAsGroup.prototype = ...@@ -120,8 +120,10 @@ CChartAsGroup.prototype =
setDiagram: function(chart) setDiagram: function(chart)
{ {
this.chart = chart; History.Add(this, {Type:historyitem_AutoShapes_RecalculateChartUndo});
this.setAscChart(chart);
this.recalculate(); this.recalculate();
History.Add(this, {Type:historyitem_AutoShapes_RecalculateChartRedo});
}, },
OnContentReDraw: function() OnContentReDraw: function()
...@@ -2051,6 +2053,11 @@ CChartAsGroup.prototype = ...@@ -2051,6 +2053,11 @@ CChartAsGroup.prototype =
{ {
switch(data.Type) switch(data.Type)
{ {
case historyitem_AutoShapes_RecalculateChartUndo:
{
this.recalculate();
break;
}
case historyitem_SetParent: case historyitem_SetParent:
{ {
if(data.oldParent == null) if(data.oldParent == null)
...@@ -2446,6 +2453,11 @@ CChartAsGroup.prototype = ...@@ -2446,6 +2453,11 @@ CChartAsGroup.prototype =
{ {
switch(data.Type) switch(data.Type)
{ {
case historyitem_AutoShapes_RecalculateChartRedo:
{
this.recalculate();
break;
}
case historyitem_SetSizes: case historyitem_SetSizes:
{ {
this.spPr.xfrm.extX = data.oldW; this.spPr.xfrm.extX = data.oldW;
......
...@@ -268,6 +268,9 @@ var historyitem_SetSetSpPr = 46; ...@@ -268,6 +268,9 @@ var historyitem_SetSetSpPr = 46;
var historyitem_AutoShapes_SetChartTitleTxBody = 47; var historyitem_AutoShapes_SetChartTitleTxBody = 47;
var historyitem_AutoShapes_RecalculateAfterResize = 48; var historyitem_AutoShapes_RecalculateAfterResize = 48;
var historyitem_AutoShapes_SetTextPaddings = 49; var historyitem_AutoShapes_SetTextPaddings = 49;
var historyitem_AutoShapes_RecalculateChartUndo = 50;
var historyitem_AutoShapes_RecalculateChartRedo = 51;
//Типы изменений в классе GraphicObjects //Типы изменений в классе GraphicObjects
......
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