diff --git a/slsDetectorGui/slsDetectorPlotting/src/SlsQt2DHist.cxx b/slsDetectorGui/slsDetectorPlotting/src/SlsQt2DHist.cxx index fc7e09074..68ca0e79f 100644 --- a/slsDetectorGui/slsDetectorPlotting/src/SlsQt2DHist.cxx +++ b/slsDetectorGui/slsDetectorPlotting/src/SlsQt2DHist.cxx @@ -13,13 +13,14 @@ using std::cout; using std::endl; SlsQt2DHist::SlsQt2DHist(int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, double* d,double zmin,double zmax):QwtRasterData(){ + x_min=0;x_max=0;y_min=0;y_max=0; interp=0; nx_array=ny_array=0;data=0; SetData(nbinsx,xmin,xmax,nbinsy,ymin,ymax,d,zmin,zmax); } -SlsQt2DHist::~SlsQt2DHist(){if(data) delete data;} +SlsQt2DHist::~SlsQt2DHist(){if(data) delete [] data;} int SlsQt2DHist::GetBinIndex(int bx, int by){ int b = bx*ny+by; @@ -72,7 +73,7 @@ void SlsQt2DHist::SetData(int nbinsx, double xmin, double xmax, int nbinsy,doubl } if(nbinsx*nbinsy>nx_array*ny_array){ - if(data) delete data; + if(data) delete [] data; data = new double [nbinsx*nbinsy+1]; //one for under/overflow bin nx_array = nbinsx; ny_array = nbinsy; diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp index 2284593cf..e0d00be09 100644 --- a/slsDetectorGui/src/qDrawPlot.cpp +++ b/slsDetectorGui/src/qDrawPlot.cpp @@ -332,8 +332,9 @@ void qDrawPlot::SetupWidgetWindow(){ myDet->registerMeasurementFinishedCallback(&(GetMeasurementFinishedCallBack),this); //Setting the callback function to get progress from detector class(using receivers) myDet->registerProgressCallback(&(GetProgressCallBack),this); - //stream data to the gui - myDet->enableDataStreamingFromReceiver(1); + //stream data from receiver to the gui + if(detType != slsDetectorDefs::MYTHEN) + myDet->enableDataStreamingFromReceiver(1); qDefs::checkErrorMessage(myDet,"qDrawPlot::SetupWidgetWindow");