fixe delete scope bug
This commit is contained in:
parent
3df3fd50a1
commit
8a0c828ebe
|
@ -713,16 +713,16 @@ void MainWindow::CloseDigitizers(){
|
|||
|
||||
if( digi == NULL) return;
|
||||
|
||||
if(scalar && nDigiConnected > 0 ){ // scalar is child of this
|
||||
scalar->close();
|
||||
CleanUpScalar(); // this use digi->GetNChannels();
|
||||
}
|
||||
|
||||
if( scope ){
|
||||
scope->close();
|
||||
delete scope;
|
||||
scope = NULL;
|
||||
}
|
||||
|
||||
if(scalar && nDigiConnected > 0 ){ // scalar is child of this, This MUST after scope, because scope tell scalar to update ACQ status
|
||||
scalar->close();
|
||||
CleanUpScalar(); // this use digi->GetNChannels();
|
||||
}
|
||||
|
||||
if( digiSetting ){
|
||||
digiSetting->close();
|
||||
|
|
|
@ -55,6 +55,7 @@ Scope::Scope(Digitizer2Gen **digi, unsigned int nDigi, ReadDataThread ** readDat
|
|||
xaxis->setTitleText("Time [ns]");
|
||||
|
||||
updateTraceThread = new TimingThread();
|
||||
updateTraceThread->SetWaitTimeSec(0.2);
|
||||
connect(updateTraceThread, &TimingThread::TimeUp, this, &Scope::UpdateScope);
|
||||
|
||||
//*================ add Widgets
|
||||
|
@ -322,7 +323,7 @@ Scope::Scope(Digitizer2Gen **digi, unsigned int nDigi, ReadDataThread ** readDat
|
|||
}
|
||||
|
||||
Scope::~Scope(){
|
||||
//printf("------- %s \n", __func__);
|
||||
printf("------- %s \n", __func__);
|
||||
StopScope();
|
||||
updateTraceThread->Stop();
|
||||
updateTraceThread->quit();
|
||||
|
@ -330,6 +331,7 @@ Scope::~Scope(){
|
|||
delete updateTraceThread;
|
||||
for( int i = 0; i < 6; i++) delete dataTrace[i];
|
||||
delete plot;
|
||||
printf("------- end of %s \n", __func__);
|
||||
}
|
||||
|
||||
void Scope::ReadScopeSettings(){
|
||||
|
|
Loading…
Reference in New Issue
Block a user