diff --git a/slsDetectorGui/slsDetectorGui.pro b/slsDetectorGui/slsDetectorGui.pro index bdd716277..c05de4cf7 100644 --- a/slsDetectorGui/slsDetectorGui.pro +++ b/slsDetectorGui/slsDetectorGui.pro @@ -6,7 +6,7 @@ UI_HEADERS_DIR = forms/include RESOURCES += icons.qrc -DEFINES += VERBOSE #DACS_INT #VERYVERBOSE +DEFINES += VERBOSE #VERYVERBOSE #DACS_INT #VERYVERBOSE target.path += $(DESTDIR) diff --git a/slsDetectorGui/src/qDetectorMain.cpp b/slsDetectorGui/src/qDetectorMain.cpp index 7ea0fb139..130347adb 100644 --- a/slsDetectorGui/src/qDetectorMain.cpp +++ b/slsDetectorGui/src/qDetectorMain.cpp @@ -230,7 +230,6 @@ void qDetectorMain::Initialization(){ connect(tabs, SIGNAL(currentChanged(int)), this, SLOT(Refresh(int)));//( QWidget*))); // Measurement tab connect(tab_measurement, SIGNAL(StartSignal()), this,SLOT(EnableTabs())); - connect(tab_measurement, SIGNAL(StartSignal()), tab_plot,SLOT(Refresh())); connect(tab_measurement, SIGNAL(StopSignal()), myPlot,SLOT(StopAcquisition())); connect(tab_measurement, SIGNAL(CheckPlotIntervalSignal()), tab_plot,SLOT(SetFrequency())); connect(tab_measurement, SIGNAL(EnableNthFrameSignal(bool)), tab_plot,SLOT(EnableNthFrame(bool))); @@ -637,6 +636,13 @@ void qDetectorMain::EnableTabs(){ actionLoadCalibration->setVisible(expertTab); actionSaveCalibration->setVisible(expertTab); + //moved to here, so that its all in order, instead of signals and different threads + if(!enable) { + //set the plot type first(acccss shared memory) + tab_plot->Refresh(); + //sets running to true + myPlot->StartStopDaqToggle(); + } } diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp index c7e12b13b..3e93a902a 100644 --- a/slsDetectorGui/src/qDrawPlot.cpp +++ b/slsDetectorGui/src/qDrawPlot.cpp @@ -354,7 +354,7 @@ bool qDrawPlot::StartOrStopThread(bool start){ void qDrawPlot::SetScanArgument(int scanArg){ #ifdef VERBOSE - cout << "SetScanArgument function" << endl; + cout << "SetScanArgument function:" << running << endl; #endif scanArgument = scanArg; @@ -415,7 +415,7 @@ void qDrawPlot::SetScanArgument(int scanArg){ void qDrawPlot::SetupMeasurement(int currentIndex){ #ifdef VERBOSE - cout << "SetupMeasurement function" << endl; + cout << "SetupMeasurement function:" << running << endl; #endif LockLastImageArray(); diff --git a/slsDetectorGui/src/qTabMeasurement.cpp b/slsDetectorGui/src/qTabMeasurement.cpp index 801618133..fb720ef0f 100644 --- a/slsDetectorGui/src/qTabMeasurement.cpp +++ b/slsDetectorGui/src/qTabMeasurement.cpp @@ -306,8 +306,6 @@ void qTabMeasurement::startStopAcquisition(){ progressTimer->start(100); emit StartSignal(); - - myPlot->StartStopDaqToggle(); }else{ #ifdef VERBOSE cout << "Stopping Acquisition" << endl<< endl;