gala_clients/DIS_group/src/GROUPswApp.cxx
// Move the selected items from one rtl to another:
Move the selected items from one rtl to another.
Move the selected items from one rtl to another .
vbool GROUPswApp::ShiftSel(int src_id, int res_id)
{
  Initialize(GROUPswApp::ShiftSel);
  vbool ret = vFALSE;
  if ((src_id > 0) && (res_id > 0)) {
      RTListServer *src_rtl = RTListServer::find(src_id);
      RTListServer *res_rtl = RTListServer::find(res_id);
      if (src_rtl && res_rtl) {
	symbolArr src(0);
	symbolArr sel(0);
	symbolArr usel(0);
	src = src_rtl->getArr();
	src_rtl->getSelArr(sel);
	if (sel.size() > 0) {
	  symbolPtr j;
	  ForEachS (j, src) {
	    symbolPtr k;
	    bool unselected = true;
            ForEachS (k, sel) {
              if (j == k)
	        unselected = false;
	    }
	    if (unselected)
	      usel.insert_last(j);
	  }
	  src_rtl->clear();
	  src_rtl->insert(usel);
	  res_rtl->insert(sel);
        }
        ret = vTRUE;
      }
  }
  return ret;
}
vbool GROUPswApp :: ShiftSel ( int src_id , int res_id ) { Initialize ( GROUPswApp :: ShiftSel ) ; vbool ret = vFALSE ; if ( ( src_id > 0 ) && ( res_id > 0 ) ) { RTListServer * src_rtl = RTListServer :: find ( src_id ) ; RTListServer * res_rtl = RTListServer :: find ( res_id ) ; if ( src_rtl && res_rtl ) { symbolArr src ( 0 ) ; symbolArr sel ( 0 ) ; symbolArr usel ( 0 ) ; src = src_rtl -> getArr ( ) ; src_rtl -> getSelArr ( sel ) ; if ( sel . size ( ) > 0 ) { symbolPtr j ; ForEachS ( j , src ) { symbolPtr k ; bool unselected = true ; ForEachS ( k , sel ) { if ( j == k ) unselected = false ; } if ( unselected ) usel . insert_last ( j ) ; } src_rtl -> clear ( ) ; src_rtl -> insert ( usel ) ; res_rtl -> insert ( sel ) ; } ret = vTRUE ; } } return ret ; }
Move the selected items from one rtl to another:
Move the selected items from one rtl to another :