Index: trunk/SophyaPI/PIext/nobjmgr.cc
===================================================================
--- trunk/SophyaPI/PIext/nobjmgr.cc	(revision 670)
+++ trunk/SophyaPI/PIext/nobjmgr.cc	(revision 685)
@@ -368,4 +368,6 @@
 list<string>::iterator ii;
 for(ii=odel.begin(); ii != odel.end(); ii++)  DelObj(*ii,true);
+if (myImgApp)  
+  (myImgApp->ObjMgrW())->UpdateList(did);
 }
 
@@ -466,4 +468,8 @@
 (*itr).second.nobj++;
 
+if ( (myImgApp != NULL) && (myImgApp->ObjMgrW())->Visible() ) {
+  string oln = nobj + "  (T= " + typeid(*obj).name() + ")" ; 
+  (myImgApp->ObjMgrW())->AddObjList(did, oln.c_str(), no.oid);
+  }
 if (verbeux) cout << "NamedObjMgr::AddObj()  Object " << nom << " ( "  
      << typeid(*obj).name() << " ) added (Total= " << myObjs->size() << ")" << endl;  
@@ -512,4 +518,10 @@
 itr = myDirs->find(r2);
 (*itr).second.nobj++;
+
+if ( (myImgApp != NULL) && (myImgApp->ObjMgrW())->Visible() ) {
+  (myImgApp->ObjMgrW())->DelObjList(dids, no.oid);
+  string oln = n2 + "  (T= " + typeid(*(no.obj)).name() + ")" ; 
+  (myImgApp->ObjMgrW())->AddObjList(did, oln.c_str(), no.oid);
+}
 if (verbeux) 
   cout << "NamedObjMgr::RenameObj() - Object " << nom << " renamed to " << nomnew << endl;
@@ -537,5 +549,5 @@
 {
 string n1,r1;
-ParseObjectName(nom, r1, n1);
+int did = ParseObjectName(nom, r1, n1);
 nom = '/' + r1 + '/' + n1;
 NObjList::iterator it = myObjs->find(nom);
@@ -555,6 +567,11 @@
 if (fgd) delete (*it).second.obj;
 
+if ( (myImgApp != NULL) && (myImgApp->ObjMgrW())->Visible() ) {
+  int olid = (*it).second.oid;
+  (myImgApp->ObjMgrW())->DelObjList(did, olid);
+}
 myObjs->erase(it);
 (*itr).second.nobj--;
+
 
 if (!verbeux) return(true);  
@@ -707,4 +724,5 @@
 if (nobj.length()<1)  nobj = servnobjm->FileName2Name(flnm);
 AddObj(ppobj->DataObj(), nobj, true);
+cout << "NamedObjMgr::ReadObj(...) object " << nobj << " read from file " << endl;
 return;
 }
@@ -1267,5 +1285,5 @@
 {
 if (!myImgApp)  return;
-(myImgApp->ObjMgrW())->ClearHelpList();
+(myImgApp->ObjMgrW())->ClearObjList();
 
 NObjList::iterator it;  
@@ -1275,5 +1293,5 @@
   cn = (*it).first.substr(1);
   cn = cn.substr(cn.find('/')+1) + "  (T= " + typeid(*((*it).second.obj)).name() + ")" ;
-  (myImgApp->ObjMgrW())->AddObj(cn.c_str());
+  (myImgApp->ObjMgrW())->AddObj(cn.c_str(), (*it).second.oid);
   }
 }
Index: trunk/SophyaPI/PIext/pawexecut.cc
===================================================================
--- trunk/SophyaPI/PIext/pawexecut.cc	(revision 670)
+++ trunk/SophyaPI/PIext/pawexecut.cc	(revision 685)
@@ -193,5 +193,5 @@
   string nameproj = "/autoc/paw_n_plot1D";
   AnyDataObj* mobj = omg.GetObj(nameproj);
-  if(mobj!=NULL) omg.DelObj(nameproj);
+  //  if(mobj!=NULL) omg.DelObj(nameproj);  $CHECK$ Reza 12/12/99 - clean auto 
   srvo->ProjectH1(nameobj,expx,expwt,expcut,nameproj,dopt,loop);
 } else if(nvar==2) { // c'est un plot 2D
@@ -368,5 +368,5 @@
 Histo* h1p = NULL; string nametoplot = "/autoc/h_plot_2d_h1";
 AnyDataObj* mobjh1 = omg.GetObj(nametoplot);
-if(mobjh1!=NULL) omg.DelObj(nametoplot);
+// if(mobjh1!=NULL) omg.DelObj(nametoplot);  $CHECK$ Reza 12/12/99 - Ne pas faire - autoclean
 
 string dopt = ""; if(tokens.size()>=3) dopt = tokens[2];
Index: trunk/SophyaPI/PIext/pintuple.cc
===================================================================
--- trunk/SophyaPI/PIext/pintuple.cc	(revision 670)
+++ trunk/SophyaPI/PIext/pintuple.cc	(revision 685)
@@ -162,4 +162,11 @@
 g->SelMarker(msz, mrk);
 
+PIGrCoord uxmin, uxmax, uymin, uymax;
+g->GetGrSpace(uxmin, uxmax, uymin, uymax);
+double xmin2 = uxmin;
+double ymin2 = uymin;
+double xmax2 = uxmax;
+double ymax2 = uymax;
+
 nok = 0;  
 xp = yp = xl = yl = 0;
@@ -169,4 +176,5 @@
   yp = mNT->GetCell(i, yK);
   if ( (xp < xmin) || (xp > xmax) || (yp < ymin) || (yp > ymax) )  continue;
+  if ( (xp < xmin2) || (xp > xmax2) || (yp < ymin2) || (yp > ymax2) )  continue;
   if ( (i > 0) && (mLAtt != PI_NotDefLineAtt) )   // On relie les points ...
     g->DrawLine(xl, yl, xp, yp);
Index: trunk/SophyaPI/PIext/pisiadw.cc
===================================================================
--- trunk/SophyaPI/PIext/pisiadw.cc	(revision 670)
+++ trunk/SophyaPI/PIext/pisiadw.cc	(revision 685)
@@ -23,5 +23,5 @@
 /* --Methode-- */
 ObjMgrWind::ObjMgrWind(PIStdImgApp *par)
-: PIWindow((PIMsgHandler *)par, "objmgr", PIWK_dialog, 
+: PIWindow((PIMsgHandler *)par, "objmgr", PIWK_normal, 
            400, 300, 250, 250)
 {
@@ -45,5 +45,5 @@
 int py = spy;
 int px = 2*spx+3*bsx;
-mBut[0] = new PIButton(this, "SetCurDir", 10, bsx, bsy, px, py);   py += (bsy+spy);
+mBut[0] = new PIButton(this, "SetCurObj", 10, bsx, bsy, px, py);   py += (bsy+spy);
 mBut[1] = new PIButton(this, "Display", 20, bsx, bsy, px, py);   py += (bsy+spy);
 mBut[2] = new PIButton(this, "Print",   30, bsx, bsy, px, py);   py += (bsy+spy);
@@ -70,5 +70,5 @@
 void ObjMgrWind::Show()
 {
-dap->SetBlocked();
+// dap->SetBlocked();  Ce n'est plus necessaire - Reza 11/12/99
 string cdir;
 dap->ObjMgr()->GetCurrentDir(cdir);
@@ -80,4 +80,5 @@
 }
 
+
 /* --Methode-- */
 void ObjMgrWind::Process(PIMessage msg, PIMsgHandler* /*sender*/, void* /*data*/)
@@ -95,13 +96,16 @@
   return;
   }
-else if (msg == 10) {
+/*
+ else if (msg == 10) {
   string cdir = dirlist->GetValueStr();
   dap->ObjMgr()->SetCurrentDir(cdir);
   return;
   }
+*/
 
 string nom = "";
-if ( (msg == 20) || (msg == 30) || (msg == 40) || (msg == 50) ) {
-  string sel = objlist->GetSelectionStr();
+string sel = "";
+if ( (msg == 10) || (msg == 20) || (msg == 30) || (msg == 40) || (msg == 50) ) {
+  sel = objlist->GetSelectionStr();
   //  size_t p = sel.find_first_not_of(" \t");
   //  if (p<0) p = 0;
@@ -114,8 +118,16 @@
 NamedObjMgr* om = dap->ObjMgr();
 if (om == NULL)  return;
+if (sel.length() < 1)  return;
 if (nom.length() < 1)  return;
 
 switch (msg)
   {
+  case 10:
+    {
+    string cmd = "set cobj " + nom ;
+    cout << " Setting current object ($cobj) to " << nom << endl;
+    dap->CmdInterpreter()->Interpret(cmd);
+    }
+    break;
   case 20:
     om->DisplayObj(nom);
@@ -129,5 +141,5 @@
   case 50:
     om->DelObj(nom);
-    objlist->DeleteItemMsg(objlist->GetSelection());
+    //    objlist->DeleteItemMsg(objlist->GetSelection());
     //    dap->ObjMgr()->UpdateObjMgrWindow(dirlist->GetValue()-30000);
     break;
@@ -141,4 +153,29 @@
 }
 
+/* --Methode-- */
+void ObjMgrWind::UpdateList(int did)
+{
+if (!Visible()) return;
+if (did != (dirlist->GetValue()-30000) )  return;
+dap->ObjMgr()->UpdateObjMgrWindow(did);
+return;
+}
+
+/* --Methode-- */
+void ObjMgrWind::AddObjList(int did, const char * objn, int oid)
+{
+if (!Visible()) return;
+if (did != (dirlist->GetValue()-30000) )  return;
+mNitem++;  objlist->AppendItem(objn, oid);
+}
+
+/* --Methode-- */
+void ObjMgrWind::DelObjList(int did, int oid)
+{
+if (!Visible()) return;
+//DBG printf("DBG-DelObjList %d , %d , (%d) \n", did, dirlist->GetValue()-30000, oid);
+if (did != (dirlist->GetValue()-30000) )  return;
+objlist->DeleteItemMsg(oid);
+}
 
 /* ........................................................... */
Index: trunk/SophyaPI/PIext/pisiadw.h
===================================================================
--- trunk/SophyaPI/PIext/pisiadw.h	(revision 670)
+++ trunk/SophyaPI/PIext/pisiadw.h	(revision 685)
@@ -34,8 +34,13 @@
   inline  void  DelDirectory(int did)
                     { dirlist->Menu()->DeleteItemMsg(30000+did); }
-  inline  void  ClearHelpList() 
+  inline  void  ClearObjList() 
                     { mNitem=0; objlist->DeleteAllItems(); }
-  inline  void	AddObj(const char * objn) 
-		    { mNitem++;  objlist->AppendItem(objn, 100+mNitem); }
+  inline  void	AddObj(const char * objn, int oid) 
+		    { mNitem++;  objlist->AppendItem(objn, oid); }
+
+  virtual void  UpdateList(int did);
+  virtual void	AddObjList(int did, const char * objn, int oid); 
+  virtual void	DelObjList(int did, int oid); 
+
 private:
   PIStdImgApp* dap;
Index: trunk/SophyaPI/PIext/pistdimgapp.cc
===================================================================
--- trunk/SophyaPI/PIext/pistdimgapp.cc	(revision 670)
+++ trunk/SophyaPI/PIext/pistdimgapp.cc	(revision 685)
@@ -153,5 +153,7 @@
 if ( (varenv=getenv("PEIDA_WORK")) != NULL )  strncpy(WorkDir, varenv, 256);
 
-pfc = new PIFileChooser(this,"FileChooser", 5000); 
+pfc_fits = new PIFileChooser(this,"FITS-FileChooser", 10125); 
+pfc_ppf = new PIFileChooser(this,"PPF-FileChooser", 10135); 
+pfc_ps = new PIFileChooser(this,"PS-FileChooser", 10525); 
 
 mObjmgrw = new ObjMgrWind(this);
@@ -217,4 +219,8 @@
 // PrintPeidaVersion();
 
+pfc_fits->SetPath(ImgDir);
+pfc_ppf->SetPath(WorkDir);
+pfc_ps->SetPath(WorkDir);
+
 SetReady();
 }
@@ -243,5 +249,7 @@
 delete cmapv;
 
-delete pfc;
+delete pfc_fits;
+delete pfc_ppf;
+delete pfc_ps;
 
 delete mCons;
@@ -907,10 +915,9 @@
 
     case 10120 :
-      pfc->SetPath(ImgDir);
-      pfc->AcceptNewFile(false);
+      pfc_fits->AcceptNewFile(false);
       mFCMsg = 10125; 
-      pfc->SetMsg(mFCMsg);
+      pfc_fits->SetMsg(mFCMsg);
       SetBlocked();
-      pfc->Show();
+      pfc_fits->Show();
       break;
 
@@ -919,5 +926,5 @@
       if (data)  { 
         string nomobj="";
-        ObjMgr()->ReadFits(pfc->GetFileName(), nomobj);
+        ObjMgr()->ReadFits(pfc_fits->GetFileName(), nomobj);
         ObjMgr()->DisplayObj(nomobj, "win");
       }
@@ -927,10 +934,9 @@
 
     case 10130 :
-      pfc->SetPath(WorkDir);
-      pfc->AcceptNewFile(false); 
+      pfc_ppf->AcceptNewFile(false); 
       mFCMsg = 10135; 
-      pfc->SetMsg(mFCMsg);
+      pfc_ppf->SetMsg(mFCMsg);
       SetBlocked();
-      pfc->Show();
+      pfc_ppf->Show();
       break;
 
@@ -938,5 +944,5 @@
       mFCMsg = 0;
       if (data)  { 
-        PPInMgrW()->SetFile(pfc->GetFileName());
+        PPInMgrW()->SetFile(pfc_ppf->GetFileName());
         PPInMgrW()->Show();
       }
@@ -976,10 +982,9 @@
 
   case 10220 :
-     pfc->SetPath(WorkDir);
-     pfc->AcceptNewFile(true);
+     pfc_ppf->AcceptNewFile(true);
      mFCMsg = 10225;
-     pfc->SetMsg(mFCMsg);
+     pfc_ppf->SetMsg(mFCMsg);
      SetBlocked();
-     pfc->Show();
+     pfc_ppf->Show();
      break;
 
@@ -991,5 +996,5 @@
          delete mPpfout;  
        }
-       name_outppf = pfc->GetFileName();
+       name_outppf = pfc_ppf->GetFileName();
        mPpfout = NULL;
        printf("PIStdImg/Info: Opening POutPersist-File %s \n", name_outppf.c_str());
@@ -1158,10 +1163,9 @@
   { 
   case 10501 :
-     pfc->SetPath(WorkDir);
-     pfc->AcceptNewFile(true); 
+     pfc_ps->AcceptNewFile(true); 
      mFCMsg = 10525; 
-     pfc->SetMsg(mFCMsg);
+     pfc_ps->SetMsg(mFCMsg);
      SetBlocked();
-     pfc->Show();
+     pfc_ps->Show();
      break;
 
@@ -1173,5 +1177,5 @@
          delete mpsfile;  
          }
-        name_ps = pfc->GetFileName();
+        name_ps = pfc_ps->GetFileName();
         printf("PIStdImg/Info: Opening PS-File %s \n", name_ps.c_str());
         mpsfile = new PSFile(name_ps.c_str(), PI_Portrait, PI_A4, 2., 2.);
Index: trunk/SophyaPI/PIext/pistdimgapp.h
===================================================================
--- trunk/SophyaPI/PIext/pistdimgapp.h	(revision 670)
+++ trunk/SophyaPI/PIext/pistdimgapp.h	(revision 685)
@@ -140,5 +140,7 @@
     PICMapView* cmapv;
 
-    PIFileChooser * pfc;
+    PIFileChooser * pfc_fits;   // Pour les fichiers FITS
+    PIFileChooser * pfc_ppf;    //  Pour les PPF 
+    PIFileChooser * pfc_ps;     // Pour les PostScript
 
     PIConsole* mCons;
Index: trunk/SophyaPI/PIext/pistlist.cc
===================================================================
--- trunk/SophyaPI/PIext/pistlist.cc	(revision 670)
+++ trunk/SophyaPI/PIext/pistlist.cc	(revision 685)
@@ -106,4 +106,11 @@
 if (!mStL) return;
 
+PIGrCoord uxmin, uxmax, uymin, uymax;
+g->GetGrSpace(uxmin, uxmax, uymin, uymax);
+double xmin2 = uxmin;
+double ymin2 = uymin;
+double xmax2 = uxmax;
+double ymax2 = uymax;
+
 int msz = mMSz;
 if (msz < 1) msz = 1;
@@ -118,4 +125,5 @@
   xp = sti->PosX();   yp = sti->PosY();
   if ( (xp < xmin) || (xp > xmax) || (yp < ymin) || (yp > ymax) )  continue;
+  if ( (xp < xmin2) || (xp > xmax2) || (yp < ymin2) || (yp > ymax2) )  continue;
   nok++;
   sz = (int)((log10((double)flx/mF0))/mDLgF*(double)nl2-0.01) + msz;
@@ -148,5 +156,5 @@
 char buff[128];
 int ncnt = 0;
-sprintf(buff,"PIStarList: NStars \n", mStL->NbStars() );
+sprintf(buff,"PIStarList: NStars %d \n", mStL->NbStars() );
 info += buff;
 info += "  Num:   XPos       YPos     Flux      Fond \n";
