Commit 55b10506f50e72e2b419743696c9ff6ae73ef6f4

Authored by Benjamin Renard
1 parent b9dc631b

Update correctly plot tab result title

js/app/controllers/PlotModule.js
... ... @@ -119,7 +119,7 @@ Ext.define('amdaDesktop.PlotModule', {
119 119 me.plotResultWindowsManager.unregister(win);
120 120 },
121 121 afterrender: function(win,opt) {
122   - win.updateTitle(tabResult.multiplot);
  122 + win.getPanelResult().updateConfig(tabResult.title, tabResult.multiplot);
123 123 }
124 124 },
125 125 getPanelResult: function() {
... ... @@ -134,7 +134,7 @@ Ext.define('amdaDesktop.PlotModule', {
134 134 }
135 135 else {
136 136 //update result
137   - winResult.getPanelResult().updateMultiplot(tabResult.multiplot);
  137 + winResult.getPanelResult().updateConfig(tabResult.title, tabResult.multiplot);
138 138 winResult.getPanelResult().updatePlotImage(plotTabConfig, newplot);
139 139 //update window size
140 140 var size = me.computeResultWindowSize(winResult.getPanelResult());
... ... @@ -279,7 +279,7 @@ Ext.define('amdaDesktop.PlotModule', {
279 279 me.multiPlotWin = null;
280 280 me.getUiContent().enableSinglePlot(true);
281 281 me.plotResultWindowsManager.each(function (key, value, length) {
282   - value.getPanelResult().updateMultiplot(false);
  282 + value.getPanelResult().updateConfig(value.getPanelResult().plotName, false);
283 283 });
284 284 }
285 285 }
... ...
js/app/views/PlotTabResultUI.js
... ... @@ -28,6 +28,7 @@ Ext.define('amdaUI.PlotTabResultUI', {
28 28 crtTTFileIndex : 0,
29 29 disableSynchronize: false,
30 30 multiplot: false,
  31 + plotName: '',
31 32  
32 33 hiddenForm: null,
33 34  
... ... @@ -38,9 +39,10 @@ Ext.define('amdaUI.PlotTabResultUI', {
38 39 this.callParent(arguments);
39 40 },
40 41  
41   - updateMultiplot : function(multiplot) {
  42 + updateConfig : function(name, multiplot) {
42 43 this.multiplot = multiplot;
43   - this.findParentByType('window').updateTitle(this.multiplot);
  44 + this.plotName = name;
  45 + this.findParentByType('window').setTitle(this.plotName + (this.multiplot ? ' - Synchronized to Multiplot' : ''));
44 46 },
45 47  
46 48 getImageSize : function() {
... ...