From d6e160fdab9ba55760288d47dc4d54970600f965 Mon Sep 17 00:00:00 2001
From: pospelov <pospelov@fz-juelich.de>
Date: Wed, 6 Feb 2013 13:51:30 +0100
Subject: [PATCH] Fix in tree observer

---
 App/src/FitSuiteObserverFactory.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/App/src/FitSuiteObserverFactory.cpp b/App/src/FitSuiteObserverFactory.cpp
index a0812c200e9..e8a0be63396 100644
--- a/App/src/FitSuiteObserverFactory.cpp
+++ b/App/src/FitSuiteObserverFactory.cpp
@@ -243,6 +243,11 @@ void FitSuiteObserverWriteTree::update(IObservable *subject)
     const OutputData<double > *simu_data = fitSuite->getFitObjects()->getSimulationData();
     IsGISAXSTools::exportOutputDataInVectors2D(*real_data, event->real_data, event->axis0, event->axis1);
     IsGISAXSTools::exportOutputDataInVectors2D(*simu_data, event->fit_data, event->axis0, event->axis1);
+    if( fitSuite->getNCalls() ) { // we have our axis saved only for the first event
+        event->axis0.clear();
+        event->axis1.clear();
+    }
+
     event->chi2 = fitSuite->getFitObjects()->getChiSquaredValue();
     for(FitSuiteParameters::iterator it = fitSuite->getFitParameters()->begin(); it!=fitSuite->getFitParameters()->end(); ++it) {
         event->parvalues.push_back( (*it)->getValue() );
-- 
GitLab