Skip to content

Commit

Permalink
Merge pull request #150 from ehb54/alexey-dev-reverse-liveupdate
Browse files Browse the repository at this point in the history
GMP, R&D: 2. LIVE UPDATE : reverse early-stage live update to the earlier (stable) behavior...
  • Loading branch information
demeler authored Nov 1, 2024
2 parents 6e2a7f7 + 4905f41 commit 2aff6a0
Showing 1 changed file with 32 additions and 24 deletions.
56 changes: 32 additions & 24 deletions programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3477,7 +3477,7 @@ DbgLv(1) << "RDa: runType2 scanmask" << runType2 << scanmask << "[ifw]scn_rows
qApp->processEvents(); //ALEXEY: maybe this will help
DbgLv(1) << "RDa: 1. Crashes HERE!!!!";


/****** REVERSE TO GUI refreshing *********************************************************************
//First time setting Optics types counter //////////////////////////////////////////////
if ( !in_reload_all_data_set_gui )
{
Expand All @@ -3494,22 +3494,24 @@ DbgLv(1) << "RDa: runType2 scanmask" << runType2 << scanmask << "[ifw]scn_rows
this, SLOT ( changeOptics_auto( ) ));
}
// END of [First time setting Optics types counter] /////////////////////////////////////


// cb_optsys->disconnect();
// cb_optsys->clear();
// DbgLv(1) << "RDa: 1a. Crashes HERE!!!!";
*******************************************************************************************************/

/********* OLDER code *************************************************/
cb_optsys->disconnect();
cb_optsys->clear();
DbgLv(1) << "RDa: 1a. Crashes HERE!!!!";

// cb_optsys->addItems( opsys_auto ); // ALEXEY fill out Optics listbox
// DbgLv(1) << "RDa: 1ab. Crashes HERE!!!! - BEFORE Setting index to cb_optsys: optndx_auto = " << optndx_auto;
// cb_optsys->setCurrentIndex( optndx_auto );
// DbgLv(1) << "RDa: 1ac. Crashes HERE!!!! - AFTER Setting index to cb_optsys";
cb_optsys->addItems( opsys_auto ); // ALEXEY fill out Optics listbox
DbgLv(1) << "RDa: 1ab. Crashes HERE!!!! - BEFORE Setting index to cb_optsys: optndx_auto = " << optndx_auto;
cb_optsys->setCurrentIndex( optndx_auto );
DbgLv(1) << "RDa: 1ac. Crashes HERE!!!! - AFTER Setting index to cb_optsys";

// // connect( cb_optsys, SIGNAL( currentIndexChanged( int ) ),
// // this, SLOT ( changeOptics( ) ) );

// connect( cb_optsys, SIGNAL( currentIndexChanged( int ) ),
// this, SLOT ( changeOptics_auto( ) ));
// this, SLOT ( changeOptics( ) ) );

connect( cb_optsys, SIGNAL( currentIndexChanged( int ) ),
this, SLOT ( changeOptics_auto( ) ));
/*** END of an older code **********************************************/

DbgLv(1) << "RDa: 1b. Crashes HERE!!!!";

Expand Down Expand Up @@ -3550,7 +3552,7 @@ DbgLv(1) << "RDa: ncellch" << ncellch << cellchans.count();
DbgLv(1) << "RDa: nscan" << nscan << "npoint" << npoint;
DbgLv(1) << "RDa: rvS rvE" << r_radii[0] << r_radii[npoint-1];


/****** REVERSE TO GUI refreshing *********************************************************************
//First time setting Cell/Channs counter //////////////////////////////////////////////////////
if ( !in_reload_all_data_set_gui )
{
Expand All @@ -3562,14 +3564,17 @@ DbgLv(1) << "RDa: rvS rvE" << r_radii[0] << r_radii[npoint-1];
this, SLOT ( changeCellCh( ) ) );
}
//END of [First time setting Cell/Channs counter ] //////////////////////////////////////////////
********************************************************************************************************/


// cb_cellchn->disconnect();
// cb_cellchn->clear();
// cb_cellchn->addItems( cellchans ); // ALEXEY fill out Cells/Channels listbox
// connect( cb_cellchn, SIGNAL( currentIndexChanged( int ) ),
// this, SLOT ( changeCellCh( ) ) );
/********* OLDER code **************************************************************/
cb_cellchn->disconnect();
cb_cellchn->clear();
cb_cellchn->addItems( cellchans ); // ALEXEY fill out Cells/Channels listbox
connect( cb_cellchn, SIGNAL( currentIndexChanged( int ) ),
this, SLOT ( changeCellCh( ) ) );
/*** END of an older code ***********************************************************/


nlambda = xpn_data->lambdas_raw( lambdas ); // ALEXEY lambdas
int wvlo = lambdas[ 0 ];
int wvhi = lambdas[ nlambda - 1 ];
Expand Down Expand Up @@ -3609,6 +3614,7 @@ DbgLv(1) << "RDa: allData size" << allData.size();
in_reload_auto = false;

// Ok to enable some buttons now
/****** REVERSE TO GUI refreshing *********************************************************************
//First time enabling Controls ///////////////////////////////////////////////////////
if ( !in_reload_all_data_set_gui )
{
Expand All @@ -3617,10 +3623,12 @@ DbgLv(1) << "RDa: allData size" << allData.size();
in_reload_all_data_set_gui = true;
}
//ENF of [First time enabling Controls ] //////////////////////////////////////////////

*******************************************************************************************************/

/** OLDER WAY *******************************************************************************/
enableControls(); //ALEXEY ...and actual plotting data
/** END of OLDER WAY ************************************************************************/

// enableControls(); //ALEXEY ...and actual plotting data

if ( combinedOptics )
{
qDebug() << "CellChNumber, cellchans.count() for runType " << runType << ": " << CellChNumber_map[ runType ].toInt() << ", " << cellchans.count();
Expand Down

0 comments on commit 2aff6a0

Please sign in to comment.