From a56f041d1ac47859047c522b83a5db56826064c1 Mon Sep 17 00:00:00 2001 From: Elena.Budnik Date: Mon, 19 Nov 2018 17:18:47 +0100 Subject: [PATCH] bug whne multi panel plot --- js/app/models/PlotObjects/PlotRequestObject.js | 9 +++++---- js/app/views/PlotUI.js | 4 ++++ 2 files changed, 9 insertions(+), 4 deletions(-) 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