Changeset 2762 in Sophya for trunk/SophyaPI/PIext/nobjmgr.cc


Ignore:
Timestamp:
May 24, 2005, 6:31:58 PM (20 years ago)
Author:
ansari
Message:

Suite corrections ZSync + correction (probable) du probleme de plantage a la fin lie a imagnav - reste a corriger menu::del_cur_widget - Reza 24/05/2005

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/nobjmgr.cc

    r2757 r2762  
    499499list<string>::iterator ii;
    500500for(ii=odel.begin(); ii != odel.end(); ii++)  DelObj_P(*ii,true);
    501 if (myImgApp) {
    502   if ( !_fgimgapp )  myImgApp->LockMutex();
    503   (myImgApp->ObjMgrW())->UpdateList(did);
    504   if ( !_fgimgapp )  myImgApp->UnlockMutex(true);
    505 }
     501
     502UpdateObjMgrWindow_P(did);  // On met a jour la fenetre de gestion des objets
    506503}
    507504
     
    13881385else if (arr) wrsid = myImgApp->DispImage(arr, n1, dopt, false, 0, fglock);
    13891386
    1390 AddWRsId(nom, wrsid);
     1387AddWRsId_P(nom, wrsid);
    13911388return;
    13921389}
     
    14291426wrsid = myImgApp->DispImage(arr, n1, dopt, fgimagnav, 0, fglock);
    14301427
    1431 AddWRsId(nom, wrsid);
     1428AddWRsId_P(nom, wrsid);
    14321429return;
    14331430}
     
    14761473PISurfaceDrawer* sdr = new PISurfaceDrawer(arr, true, true, true);
    14771474wrsid = myImgApp->Disp3DDrawer(sdr, n1, dopt, "", 0, fglock);
    1478 AddWRsId(nom, wrsid);
     1475AddWRsId_P(nom, wrsid);
    14791476return;
    14801477}
     
    15331530  }
    15341531
    1535 AddWRsId(nom, wrsid);
     1532AddWRsId_P(nom, wrsid);
    15361533return;
    15371534}
     
    15971594}
    15981595
    1599 AddWRsId(nom, wrsid);
     1596AddWRsId_P(nom, wrsid);
    16001597
    16011598return;
     
    17121709void NamedObjMgr::AddWRsId(string & nom, int wrsid)
    17131710{
     1711ZSync zs(*myMutex); zs.NOp();
     1712AddWRsId_P(nom, wrsid);
     1713}
     1714
     1715/* --Methode-- */
     1716void NamedObjMgr::AddWRsId_P(string & nom, int wrsid)
     1717{
    17141718if(wrsid != 0) {
    17151719  NObjList::iterator it = myObjs->find(nom);
     
    17241728{
    17251729if (!myImgApp)  return;
    1726 //RZDEL ZSync zs(*myMutex); zs.NOp();
     1730ZSync zs(*myMutex); zs.NOp();
     1731UpdateObjMgrWindow_P(did);
     1732}
     1733
     1734/* --Methode-- */
     1735void NamedObjMgr::UpdateObjMgrWindow_P(int did)
     1736{
     1737if (!myImgApp)  return;
    17271738if ( !_fgimgapp )  myImgApp->LockMutex();
     1739if ( !(myImgApp->ObjMgrW())->Visible() ||
     1740     ( (myImgApp->ObjMgrW())->GetCurDirId() != did) ) {
     1741  if ( !_fgimgapp )  myImgApp->UnlockMutex(true);
     1742  return;
     1743  }
    17281744
    17291745(myImgApp->ObjMgrW())->ClearObjList();
     
    17381754  (myImgApp->ObjMgrW())->AddObj(cn.c_str(), (*it).second.oid);
    17391755  }
    1740 
    17411756if ( !_fgimgapp )  myImgApp->UnlockMutex(true);
     1757return;
    17421758}
    17431759
Note: See TracChangeset for help on using the changeset viewer.