Révision 1713

tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/ChartResult.java (revision 1713)
237 237

  
238 238
		Log.finest("*** ChartResult.renderChart(): rendering chart for result " + this.getClass() + " and chart type " + this.getChartType() + "..."); //$NON-NLS-1$
239 239

  
240
		
241
		// FIXME: SJ: need to clear the last computing parameters else we can't check if a computing parameter has changed in the chart creators
242
//		if(this.parametersHistory.size() > 2
243
				
244
//				|| this.getLastParametersFromHistory().isEmpty()
245
	//			)	{
246
			//this.clearLastComputingParameters();
247
//		}
248

  
249 240
		// update the chart dirty state from history if a parameter has changed since last computing
250 241
		this.updateChartDirtyFromHistory();
251 242
		
......
304 295
			}
305 296

  
306 297
			// Updating
307
			Log.finest("ChartResult.renderChart(): updating chart...");
298
			Log.finest("ChartResult.renderChart(): updating chart..."); //$NON-NLS-1$
308 299

  
309 300
			// 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
310 301
			// also before the call of this.updateLastParameters() to be able to check if a computing parameter has changed in the chart creators 
......
318 309

  
319 310
			this.needsToClearItemsSelection = false;
320 311
			this.needsToResetView = false;
321
//			this.needsToSquareOff = false;
322 312

  
323 313
			this.chartDirty = false;
324 314

  
325
			// file persistence flush
326
//			if (this.mustBePersisted()) {
327
//				TXMPreferences.flush(this);
328
//			}
329
			
330 315
			// Debug
331 316
			Log.finest("ChartResult.renderChart(): chart rendering done."); //$NON-NLS-1$
332 317

  
......
339 324
		}
340 325
	}
341 326

  
342

  
343
//	@Override
344
//	public boolean hasParameterChanged(String key) {
345
//		if (key.isEmpty()) {
346
//			return false;
347
//		}
348
//		return super.hasParameterChanged(key);
349
//	}
350

  
351

  
352 327
	@Override
353 328
	public String dumpParameters() {
354 329
		return super.dumpParameters() + "\n" + this.dumpParameters(Parameter.RENDERING); //$NON-NLS-1$
355 330
	}
356 331

  
357
//	/**
358
//	 * Updates the parameters used for last rendering.
359
//	 * 
360
//	 * @throws Exception
361
//	 */
362
//	protected void updateLastRenderingParameters() throws Exception {
363
//		this.updateLastParameters(Parameter.RENDERING, true);
364
//	}
365

  
366 332
	/**
367 333
	 * Clears the parameters used for last rendering.
368 334
	 * Dedicated to force a chart recreation, eg. for cloning the chart result or for dynamically changing the chart type .
......
372 338
		this.clearLastParameters(Parameter.RENDERING);
373 339
	}
374 340

  
375

  
376
	
377 341
	/**
378 342
	 * Checks if at least one rendering parameter value has changed since last computing.
379 343
	 * @return
......
409 373
		ChartResult clone = null;
410 374
		clone = (ChartResult) super.clone();
411 375
		clone.chart = null;
412
		// FIXME: would be nice to clone the chart if possible instead of clearing the last rendering parameters?
376
		// FIXME: SJ: would be nice to clone the chart if possible instead of clearing the last rendering parameters?
413 377
		//clone.chart = this.chart.clone();
414 378
		clone.clearLastRenderingParameters(); // to force recreation of the chart at next computing // FIXME: SJ: need to see if it's necessary, the chartDirty state may be sufficient
415 379
		clone.chartDirty = true;

Formats disponibles : Unified diff