Commit a56f041d1ac47859047c522b83a5db56826064c1
1 parent
647d796e
Exists in
master
and in
108 other branches
bug whne multi panel plot
Showing
2 changed files
with
9 additions
and
4 deletions
Show diff stats
js/app/models/PlotObjects/PlotRequestObject.js
@@ -31,7 +31,8 @@ Ext.define('amdaPlotObj.PlotRequestObject', { | @@ -31,7 +31,8 @@ Ext.define('amdaPlotObj.PlotRequestObject', { | ||
31 | {name: 'last-plotted-tab', type: 'int', defaultValue: 0}, | 31 | {name: 'last-plotted-tab', type: 'int', defaultValue: 0}, |
32 | {name: 'last-tab-id', type: 'int', defaultValue: 0}, | 32 | {name: 'last-tab-id', type: 'int', defaultValue: 0}, |
33 | {name: 'active-tab-id', type: 'int', defaultValue: 1}, | 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 | hasMany: { | 38 | hasMany: { |
@@ -154,8 +155,8 @@ Ext.define('amdaPlotObj.PlotRequestObject', { | @@ -154,8 +155,8 @@ Ext.define('amdaPlotObj.PlotRequestObject', { | ||
154 | } | 155 | } |
155 | 156 | ||
156 | requestValues['tabs'] = []; | 157 | requestValues['tabs'] = []; |
157 | - | ||
158 | - if (this.get('all-in-one')) { | 158 | + |
159 | + if (this.get('all-in-one') || this.get('is-plot')) { | ||
159 | this.tabs().each(function (tab, index) { | 160 | this.tabs().each(function (tab, index) { |
160 | requestValues['tabs'][index] = tab.getJsonValues(); | 161 | requestValues['tabs'][index] = tab.getJsonValues(); |
161 | }); | 162 | }); |
@@ -168,7 +169,7 @@ Ext.define('amdaPlotObj.PlotRequestObject', { | @@ -168,7 +169,7 @@ Ext.define('amdaPlotObj.PlotRequestObject', { | ||
168 | requestValues['tabs'][0] = tab.getJsonValues(); | 169 | requestValues['tabs'][0] = tab.getJsonValues(); |
169 | 170 | ||
170 | requestValues['tabs'][0]['id'] = "1"; | 171 | requestValues['tabs'][0]['id'] = "1"; |
171 | - requestValues['active-tab-id'] = "1"; | 172 | + requestValues['active-tab-id'] = "1"; |
172 | requestValues['last-tab-id'] = "1"; | 173 | requestValues['last-tab-id'] = "1"; |
173 | requestValues['last-plotted-tab'] = "0"; | 174 | requestValues['last-plotted-tab'] = "0"; |
174 | } | 175 | } |
js/app/views/PlotUI.js
@@ -70,6 +70,8 @@ Ext.define('amdaUI.PlotUI', { | @@ -70,6 +70,8 @@ Ext.define('amdaUI.PlotUI', { | ||
70 | * save method called by Save button to launch the save process | 70 | * save method called by Save button to launch the save process |
71 | */ | 71 | */ |
72 | saveProcess : function(toRename) { | 72 | saveProcess : function(toRename) { |
73 | + this.object.set('is-plot', false); | ||
74 | + | ||
73 | var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id); | 75 | var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id); |
74 | if (!plotModule) | 76 | if (!plotModule) |
75 | return; | 77 | return; |
@@ -116,7 +118,9 @@ Ext.define('amdaUI.PlotUI', { | @@ -116,7 +118,9 @@ Ext.define('amdaUI.PlotUI', { | ||
116 | * plot method called by 'Do Plot' button to launch the plot process | 118 | * plot method called by 'Do Plot' button to launch the plot process |
117 | */ | 119 | */ |
118 | doPlot : function(){ | 120 | doPlot : function(){ |
121 | + | ||
119 | this.updateObject(); | 122 | this.updateObject(); |
123 | + this.object.set('is-plot', true); | ||
120 | this.object.set('last-plotted-tab', this.plotTabs.getSelectedTabId()); | 124 | this.object.set('last-plotted-tab', this.plotTabs.getSelectedTabId()); |
121 | var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id); | 125 | var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id); |
122 | if (plotModule) | 126 | if (plotModule) |