Some problems with LogZ solved, but stil crashing when unsetting logZ

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@103 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
bergamaschi
2012-10-24 10:39:05 +00:00
parent 3e979fdece
commit 07ff5ce42d
3 changed files with 44 additions and 23 deletions

View File

@@ -105,7 +105,12 @@ void SlsQt2DHist::SetMinMax(double zmin,double zmax){
if(z_min>0) z_min/=1.02; else z_min*=1.02;
if(z_max>0) z_max*=1.02; else z_max/=1.02;
}
setInterval( Qt::ZAxis,QwtInterval(z_min,z_max));
#if QWT_VERSION<0x060000
;
#else
setInterval( Qt::ZAxis,QwtInterval(z_min,z_max));
#endif
}
double SlsQt2DHist::GetMean(){
@@ -122,8 +127,14 @@ double SlsQt2DHist::GetMean(){
double SlsQt2DHist::SetMinimumToFirstGreaterThanZero(){
z_min=abs(z_max)+1;
for(int i=0;i<nb;i++){
if(data[i]>0&&data[i]<z_min) z_min=data[i];
if(data[i]>0 && data[i]<z_min) z_min=data[i];
}
#if QWT_VERSION<0x060000
;
#else
setInterval( Qt::ZAxis,QwtInterval(z_min,z_max));
#endif
return z_min;
}