diff --git a/js/app/models/PlotObjects/PlotRequestObject.js b/js/app/models/PlotObjects/PlotRequestObject.js index dd0961a..3833686 100644 --- a/js/app/models/PlotObjects/PlotRequestObject.js +++ b/js/app/models/PlotObjects/PlotRequestObject.js @@ -31,7 +31,8 @@ Ext.define('amdaPlotObj.PlotRequestObject', { {name: 'last-plotted-tab', type: 'int', defaultValue: 0}, {name: 'last-tab-id', type: 'int', defaultValue: 0}, {name: 'active-tab-id', type: 'int', defaultValue: 1}, - {name: 'all-in-one', type: 'boolean', defaultValue: false} + {name: 'all-in-one', type: 'boolean', defaultValue: false}, + {name: 'is-plot', type: 'boolean', defaultValue: true} ], hasMany: { @@ -154,8 +155,8 @@ Ext.define('amdaPlotObj.PlotRequestObject', { } requestValues['tabs'] = []; - - if (this.get('all-in-one')) { + + if (this.get('all-in-one') || this.get('is-plot')) { this.tabs().each(function (tab, index) { requestValues['tabs'][index] = tab.getJsonValues(); }); @@ -168,7 +169,7 @@ Ext.define('amdaPlotObj.PlotRequestObject', { requestValues['tabs'][0] = tab.getJsonValues(); requestValues['tabs'][0]['id'] = "1"; - requestValues['active-tab-id'] = "1"; + requestValues['active-tab-id'] = "1"; requestValues['last-tab-id'] = "1"; requestValues['last-plotted-tab'] = "0"; } diff --git a/js/app/views/PlotUI.js b/js/app/views/PlotUI.js index b746541..e1b92a9 100644 --- a/js/app/views/PlotUI.js +++ b/js/app/views/PlotUI.js @@ -70,6 +70,8 @@ Ext.define('amdaUI.PlotUI', { * save method called by Save button to launch the save process */ saveProcess : function(toRename) { + this.object.set('is-plot', false); + var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id); if (!plotModule) return; @@ -116,7 +118,9 @@ Ext.define('amdaUI.PlotUI', { * plot method called by 'Do Plot' button to launch the plot process */ doPlot : function(){ + this.updateObject(); + this.object.set('is-plot', true); this.object.set('last-plotted-tab', this.plotTabs.getSelectedTabId()); var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id); if (plotModule) -- libgit2 0.21.2