From 4905f414e538675315c1e98569e7fa28a1879dbe Mon Sep 17 00:00:00 2001 From: alexsav815 Date: Sun, 13 Oct 2024 19:15:25 -0500 Subject: [PATCH] GMP, R&D: 2. LIVE UPDATE : reverse early-stage live update to the earlier (stable) behavior... --- programs/us_xpn_viewer/us_xpn_viewer_gui.cpp | 56 +++++++++++--------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp b/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp index 435062dc1..ae4b369d3 100644 --- a/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp +++ b/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp @@ -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 ) { @@ -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!!!!"; @@ -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 ) { @@ -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 ]; @@ -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 ) { @@ -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();