diff --git a/js/app/models/PlotObjects/PlotRequestObject.js b/js/app/models/PlotObjects/PlotRequestObject.js index 3960fa2..e7430c8 100644 --- a/js/app/models/PlotObjects/PlotRequestObject.js +++ b/js/app/models/PlotObjects/PlotRequestObject.js @@ -30,7 +30,7 @@ Ext.define('amdaPlotObj.PlotRequestObject', { {name: 'one-file-per-interval', type: 'boolean'}, {name: 'last-plotted-tab', type: 'int', defaultValue: 0}, {name: 'last-tab-id', type: 'int', defaultValue: 0}, - {name: 'active-tab-id', type: 'int', defaultValue: 0} + {name: 'active-tab-id', type: 'int', defaultValue: 1} ], hasMany: { diff --git a/js/app/views/PlotComponents/PlotTabPanel.js b/js/app/views/PlotComponents/PlotTabPanel.js index 3c492b9..ae38ec8 100644 --- a/js/app/views/PlotComponents/PlotTabPanel.js +++ b/js/app/views/PlotComponents/PlotTabPanel.js @@ -34,10 +34,7 @@ Ext.define('amdaPlotComp.PlotTabPanel', { this.object = object; this.removeAll(); var selectedTab = this.object.get('active-tab-id'); - // init empty request - if (selectedTab == 0) - selectedTab++; - + this.object.tabs().each(function (rec, index) { var isSelected = false; if (index+1 == selectedTab) -- libgit2 0.21.2