fixed the double plot due to unzooming in gui

This commit is contained in:
Dhanya Maliakal
2017-11-13 15:25:49 +01:00
parent a250565f44
commit 409519a3db
3 changed files with 14 additions and 11 deletions

View File

@ -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);
}