Révision 1748

tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartCreator.java (revision 1748)
77 77
	public File createChartFile(ChartResult result, File file)	{
78 78
		Object chart = this.createChart(result);
79 79
		// Synchronizes the chart with the shared preferences as show title, show legend, rendering colors mode, etc. 
80
		this.updateChart(result);
80
		//this.updateChart(result);
81 81
		return this.chartsEngine.createChartFile(chart, file);
82 82
	}
83 83
	
tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/ChartResult.java (revision 1748)
300 300

  
301 301
			// the update must be done here (BEFORE the call of this.updateLastRenderingParameters()) rather than in the SWTChartComponentsProvider => the problem is that for File based Engine, the file may be created twice, need to check this
302 302
			// also before the call of this.updateLastParameters() to be able to check if a computing parameter has changed in the chart creators 
303
			//FIXME: SJ: this call doesn't work well with File based charts engines, the file is created one time in createChartFile() and a second time in updateChart()
303 304
			chartCreator.updateChart(this);
304 305

  
305 306
			// FIXME: needed by the above fix #1
tmp/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartCreator.java (revision 1748)
21 21
	
22 22
	@Override
23 23
	public Object createChart(ChartResult result) {
24
		return this.createChartFile(result);
24
		//return this.createChartFile(result);
25
		// FIXME: SJ: tests. No need to return the chart now? it will be done in updateChart()
26
		return null;
25 27
	}
26 28

  
27 29
	
......
33 35
		// creates a new chart but using the same file
34 36
		// FIXME: SJ to MD: this case should never happen, if it happens then a bug must fixed at another location
35 37
		// TODO: find the bug then just keep: this.createChartFile(result, (File)chart);
36
		if (chart != null && chart instanceof File) {
38
		if (chart instanceof File) {
37 39
			this.createChartFile(result, (File)chart);
38 40
		}
39 41
		// creates a new chart using a new file
40 42
		else {
41
			this.createChartFile(result);
43
			result.setChart(this.createChartFile(result));
42 44
		}
43 45
	}
44 46
	

Formats disponibles : Unified diff