Commit a56f041d1ac47859047c522b83a5db56826064c1

Authored by Elena.Budnik
1 parent 647d796e

bug whne multi panel plot

js/app/models/PlotObjects/PlotRequestObject.js
... ... @@ -31,7 +31,8 @@ Ext.define('amdaPlotObj.PlotRequestObject', {
31 31 {name: 'last-plotted-tab', type: 'int', defaultValue: 0},
32 32 {name: 'last-tab-id', type: 'int', defaultValue: 0},
33 33 {name: 'active-tab-id', type: 'int', defaultValue: 1},
34   - {name: 'all-in-one', type: 'boolean', defaultValue: false}
  34 + {name: 'all-in-one', type: 'boolean', defaultValue: false},
  35 + {name: 'is-plot', type: 'boolean', defaultValue: true}
35 36 ],
36 37  
37 38 hasMany: {
... ... @@ -154,8 +155,8 @@ Ext.define('amdaPlotObj.PlotRequestObject', {
154 155 }
155 156  
156 157 requestValues['tabs'] = [];
157   -
158   - if (this.get('all-in-one')) {
  158 +
  159 + if (this.get('all-in-one') || this.get('is-plot')) {
159 160 this.tabs().each(function (tab, index) {
160 161 requestValues['tabs'][index] = tab.getJsonValues();
161 162 });
... ... @@ -168,7 +169,7 @@ Ext.define('amdaPlotObj.PlotRequestObject', {
168 169 requestValues['tabs'][0] = tab.getJsonValues();
169 170  
170 171 requestValues['tabs'][0]['id'] = "1";
171   - requestValues['active-tab-id'] = "1";
  172 + requestValues['active-tab-id'] = "1";
172 173 requestValues['last-tab-id'] = "1";
173 174 requestValues['last-plotted-tab'] = "0";
174 175 }
... ...
js/app/views/PlotUI.js
... ... @@ -70,6 +70,8 @@ Ext.define('amdaUI.PlotUI', {
70 70 * save method called by Save button to launch the save process
71 71 */
72 72 saveProcess : function(toRename) {
  73 + this.object.set('is-plot', false);
  74 +
73 75 var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id);
74 76 if (!plotModule)
75 77 return;
... ... @@ -116,7 +118,9 @@ Ext.define('amdaUI.PlotUI', {
116 118 * plot method called by 'Do Plot' button to launch the plot process
117 119 */
118 120 doPlot : function(){
  121 +
119 122 this.updateObject();
  123 + this.object.set('is-plot', true);
120 124 this.object.set('last-plotted-tab', this.plotTabs.getSelectedTabId());
121 125 var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id);
122 126 if (plotModule)
... ...