diff --git a/pub/src/edif.cpp b/pub/src/edif.cpp index da3b97823246d63df3a5500a9fcc8f24a78bf688..61c4504f73e35ee4a807d7cca2f63215bd7cf6cf 100644 --- a/pub/src/edif.cpp +++ b/pub/src/edif.cpp @@ -988,8 +988,8 @@ void NEdif::Plot( bool add ) const COlc *fc; CScan S; static int pstyle = 0, cstyle = 0; - - NOlm::JSelAsk( "Plot which scans", &JSel ); + static string jSel = ""; + NOlm::JSelAsk( "Plot which scans", &jSel, &JSel ); if (!add) { diff --git a/pub/src/manip.cpp b/pub/src/manip.cpp index 6c65df9d41f5053d81b57ddf9de6d90870713756..f4b12f36c505be283ea9181bc7eb40435751d112 100644 --- a/pub/src/manip.cpp +++ b/pub/src/manip.cpp @@ -632,7 +632,8 @@ void NManip::ScaSelect( string del_or_ret ) return; } CList JSel, JSelSorted; - NOlm::JSelAsk( action + " which scans", &JSel ); + static string jSel = ""; + NOlm::JSelAsk( action + " which scans", &jSel, &JSel ); const CEle *ein; COlo *fout; @@ -656,7 +657,8 @@ void NManip::ScaSelect( string del_or_ret ) void NManip::ScaAvge(void) { CList JSel; - NOlm::JSelAsk( "Start groups at scans", &JSel ); + static string jSel = ""; + NOlm::JSelAsk( "Start groups at scans", &jSel, &JSel ); static bool skip_zero = false; // skip_zero = bask( "Does 0 mean \"ignore this scan\"", skip_zero ); @@ -724,7 +726,8 @@ void NManip::ScaAvge(void) void NManip::ScaJoin(void) { CList JSel; - NOlm::JSelAsk( "Start groups at scans", &JSel ); + static string jSel = ""; + NOlm::JSelAsk( "Start groups at scans", &jSel, &JSel ); static bool skip_zero = false; const COld *fin; COld fout; diff --git a/pub/src/olm.cpp b/pub/src/olm.cpp index c7821d95afed3414f953c699dbc4462712440a22..c0fe98f97c3edbad21cf9eb71df57c561d6efc4b 100644 --- a/pub/src/olm.cpp +++ b/pub/src/olm.cpp @@ -434,7 +434,7 @@ void NOlm::OlfLoop(void(*exec)(int fno, COld *fin, COld *fout)) //* NOlm: scan selection *// //***************************************************************************// -void NOlm::JSelAsk( string quest, CList *jLis ) +void NOlm::JSelAsk( string quest, string *jSel, CList *jLis ) { if ( FSel.size()<=0 ) throw string( "query scan selection: no files to operate on" ); @@ -450,8 +450,7 @@ void NOlm::JSelAsk( string quest, CList *jLis ) if ( nJ==1 ) *jLis = CList("0"); else { - static string jSel = ""; - jSel = wask( quest, jSel ); - *jLis = CList ( jSel, 0, nJ-1 ); + *jSel = wask( quest, *jSel ); + *jLis = CList ( *jSel, 0, nJ-1 ); } } diff --git a/pub/src/olm.h b/pub/src/olm.h index b1908c29089a28b6799c5bcef7a6d761d7feb89c..e3acaec66d93e414cf7d245a0e00372c4cfe213b 100644 --- a/pub/src/olm.h +++ b/pub/src/olm.h @@ -172,7 +172,7 @@ namespace NOlm { // on-line memory void OlfLoop(void (*exec) (int fno, COld *fin, COld *fout)); // scan selection: - void JSelAsk( string quest, CList *JSel ); + void JSelAsk( string quest, string *jSel, CList *JSel ); class Iterate { // iterator over FSel (virtual base) protected: