mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
fixed the double plot due to unzooming in gui
This commit is contained in:
@ -68,7 +68,7 @@ public:
|
||||
SlsQt2DPlot(QWidget * = NULL);
|
||||
|
||||
// SlsQt2DHist *GetHistogram(){ return hist; }
|
||||
void UnZoom();
|
||||
void UnZoom(bool replot=true);
|
||||
void SetZoom(double xmin,double ymin,double x_width,double y_width);
|
||||
|
||||
|
||||
|
@ -164,13 +164,13 @@ void SlsQt2DPlot::SetupZoom(){
|
||||
//replot();
|
||||
}*/
|
||||
|
||||
void SlsQt2DPlot::UnZoom(){
|
||||
void SlsQt2DPlot::UnZoom(bool replot){
|
||||
#if QWT_VERSION<0x060000
|
||||
zoomer->setZoomBase(QwtDoubleRect(hist->GetXMin(),hist->GetYMin(),hist->GetXMax()-hist->GetXMin(),hist->GetYMax()-hist->GetYMin()));
|
||||
#else
|
||||
zoomer->setZoomBase(QRectF(hist->GetXMin(),hist->GetYMin(),hist->GetXMax()-hist->GetXMin(),hist->GetYMax()-hist->GetYMin()));
|
||||
#endif
|
||||
zoomer->setZoomBase();//Call replot for the attached plot before initializing the zoomer with its scales.
|
||||
zoomer->setZoomBase(replot);//Call replot for the attached plot before initializing the zoomer with its scales.
|
||||
// zoomer->zoom(0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user