fixed the zooming problems for 2d

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@231 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d 2013-08-28 15:02:17 +00:00
parent 22de76c8b0
commit 3c30ef71cf
2 changed files with 11 additions and 7 deletions

View File

@ -2,10 +2,10 @@
#define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui"
//#define SVNREPPATH ""
#define SVNREPUUID "af1100a4-978c-4157-bff7-07162d2ba061"
//#define SVNREV 0x229
//#define SVNREV 0x230
//#define SVNKIND ""
//#define SVNSCHED ""
#define SVNAUTH "l_maliakal_d"
#define SVNREV 0x229
#define SVNDATE 0x20130816
#define SVNREV 0x230
#define SVNDATE 0x20130827
//

View File

@ -458,6 +458,9 @@ int qDrawPlot::ResetDaqForGui(){
bool qDrawPlot::StartOrStopThread(bool start){
#ifdef VERBOSE
cout << "StartOrStopThread:" << start << endl;
#endif
static bool firstTime = true;
static bool gui_acquisition_thread_running = 0;
static pthread_t gui_acquisition_thread;
@ -480,8 +483,12 @@ bool qDrawPlot::StartOrStopThread(bool start){
//refixing all the min and max for all scans
if (scanArgument == qDefs::None);
else{
plot2D->GetPlot()->UnZoom();
//plot2D->GetPlot()->UnZoom();
plot2D->GetPlot()->SetXMinMax(-0.5,nPixelsX+0.5);
plot2D->GetPlot()->SetYMinMax(startPixel,endPixel);
plot2D->GetPlot()->SetZoom(-0.5,startPixel,nPixelsX,endPixel-startPixel);
plot2D->GetPlot()->UnZoom();
}
cout << "Starting new acquisition thread ...." << endl;
@ -1296,9 +1303,6 @@ void qDrawPlot::UpdatePlot(){
plot2D->SetYTitle(imageYAxisTitle);
plot2D->SetZTitle(imageZAxisTitle);
plot2D->UpdateNKeepSetRangeIfSet(); //keep a "set" z range, and call Update();
//to solve the problems regarding zooming out and zoom in
//plot2D->GetPlot()->SetZoom(-0.5,startPixel,nPixelsX,endPixel-startPixel);
}
// update range if required
if(XYRangeChanged){