From fd6c7cd165b7d99d6064668c2493086d7dea5432 Mon Sep 17 00:00:00 2001
From: Elena.Budnik <ebudnik@irap.omp.eu>
Date: Mon, 19 Nov 2018 18:04:49 +0100
Subject: [PATCH] delete not needed field is-plot

---
 js/app/models/PlotObjects/PlotRequestObject.js | 5 ++---
 js/app/views/PlotUI.js                         | 4 +---
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/js/app/models/PlotObjects/PlotRequestObject.js b/js/app/models/PlotObjects/PlotRequestObject.js
index 3833686..cc56acb 100644
--- a/js/app/models/PlotObjects/PlotRequestObject.js
+++ b/js/app/models/PlotObjects/PlotRequestObject.js
@@ -31,8 +31,7 @@ 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: 'is-plot', type: 'boolean', defaultValue: true}
+				  {name: 'all-in-one', type: 'boolean', defaultValue: false}
     ],
     
     hasMany: {
@@ -156,7 +155,7 @@ Ext.define('amdaPlotObj.PlotRequestObject', {
     	
 		requestValues['tabs'] = [];
 
-		if (this.get('all-in-one') || this.get('is-plot')) {
+		if (this.get('all-in-one')) {
 			this.tabs().each(function (tab, index) {
 				requestValues['tabs'][index] = tab.getJsonValues();
 			});
diff --git a/js/app/views/PlotUI.js b/js/app/views/PlotUI.js
index e1b92a9..b6ad001 100644
--- a/js/app/views/PlotUI.js
+++ b/js/app/views/PlotUI.js
@@ -70,8 +70,6 @@ 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;
@@ -120,7 +118,7 @@ Ext.define('amdaUI.PlotUI', {
 	doPlot : function(){
 		
 		this.updateObject();
-		this.object.set('is-plot', true);
+		this.object.set('all-in-one', true);
 		this.object.set('last-plotted-tab', this.plotTabs.getSelectedTabId());
 		var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id);
 		if (plotModule)
--
libgit2 0.21.2