mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
xyrangechanged not checked for histogram
This commit is contained in:
parent
37ea7d425f
commit
f464be38a3
@ -8,6 +8,7 @@
|
||||
#ifndef QDEFS_H
|
||||
#define QDEFS_H
|
||||
|
||||
#include "ansi.h"
|
||||
#include "sls_detector_defs.h"
|
||||
#include "slsDetector.h"
|
||||
#include "multiSlsDetector.h"
|
||||
|
@ -13,11 +13,10 @@
|
||||
#ifndef SLSQT1DPLOT_H
|
||||
#define SLSQT1DPLOT_H
|
||||
|
||||
#ifndef IAN
|
||||
typedef double double32_t;
|
||||
typedef float float32_t;
|
||||
typedef int int32_t;
|
||||
#endif
|
||||
#include "ansi.h"
|
||||
|
||||
|
||||
#include <qwt_plot.h>
|
||||
|
@ -1369,9 +1369,11 @@ void qDrawPlot::UpdatePlot(){
|
||||
histFrameIndexTitle->setText(GetHistTitle(0));
|
||||
plotHistogram->attach(plot1D);
|
||||
//refixing all the zooming
|
||||
|
||||
plot1D->SetXMinMax(startPixel,endPixel);
|
||||
plot1D->SetYMinMax(0,plotHistogram->boundingRect().height());
|
||||
plot1D->SetZoomBase(startPixel,0,endPixel-startPixel,plotHistogram->boundingRect().height());
|
||||
|
||||
}
|
||||
//not histogram
|
||||
else{
|
||||
@ -1403,9 +1405,8 @@ void qDrawPlot::UpdatePlot(){
|
||||
// firstPlot = false;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**moved from below (had applied to histograms as well) to here, */
|
||||
// update range if required
|
||||
if(XYRangeChanged){
|
||||
if(!IsXYRange[qDefs::XMINIMUM]) XYRangeValues[qDefs::XMINIMUM]= plot1D->GetXMinimum();
|
||||
@ -1419,6 +1420,7 @@ void qDrawPlot::UpdatePlot(){
|
||||
if(!histogram)
|
||||
XYRangeChanged = false;
|
||||
}
|
||||
/**moved from below (had applied to histograms as well) to here, */
|
||||
//Display Statistics
|
||||
if(displayStatistics){
|
||||
double min=0,max=0,sum=0;
|
||||
@ -1430,6 +1432,8 @@ void qDrawPlot::UpdatePlot(){
|
||||
lblMaxDisp->setText(QString("%1").arg(max));
|
||||
lblSumDisp->setText(QString("%1").arg(sum));
|
||||
}
|
||||
}
|
||||
|
||||
if(saveAll) SavePlotAutomatic();
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user