Example #1
0
void cX11_Interface::_DeletePoint(cSP_PointGlob * aSG)
{
    if (! mZFON->Get("Kill " + aSG->PG()->Name() + "?")) return;

    DeletePoint(aSG);

    RedrawAllWindows();
}
Example #2
0
bool cAppli_SaisiePts::ChangeName(std::string anOldName, std::string  aNewName)
{
    for (int aKP=0 ; aKP< int(mPG.size()) ; aKP++)
    {
        if (mPG[aKP]->PG()->Name() == aNewName)
        {
            mInterface->Warning("Name " + aNewName + " already exists\n");
            return false;
        }
    }

    for (int aKP=0 ; aKP< int(mPG.size()) ; aKP++)
    {
        if (mPG[aKP]->PG()->Name() == anOldName)
        {
            mPG[aKP]->Rename(aNewName);

            mMapPG.erase(anOldName);
            mMapPG[aNewName] = mPG[aKP];
        }
    }

    for (int aKI=0 ; aKI < mNbImTot ; aKI++)
    {
        imageTot(aKI)->UpdateMapPointes(aNewName);
    }

    for (unsigned int aKC=0 ; aKC< mInterface->GetNumCaseNamePoint(); aKC++)
    {
        cCaseNamePoint & aCN = mInterface->GetCaseNamePoint(aKC);

        if (aCN.mTCP==eCaseStd)
        {
            if (aCN.mName == anOldName)
            {
                aCN.mFree = true;
            }
            if (aCN.mName == aNewName)
            {
                aCN.mFree = false;
            }
        }
    }

    RedrawAllWindows();

    return true;
}
Example #3
0
void cAppli_SaisiePts::UndoRedo(std::vector<cUndoRedo>  & ToExe ,std::vector<cUndoRedo>  & ToPush)
{
   if ( ToExe.empty())
      return;

   const cUndoRedo & anUR = ToExe.back();

   const cOneSaisie & aS = anUR.S();
   cSP_PointeImage * aPIm  = anUR.I()->PointeOfNameGlobSVP(aS.NamePt());
   ELISE_ASSERT(aPIm!=0,"Incoherence in ExeUndoRedo");

   ToPush.push_back(cUndoRedo(*(aPIm->Saisie()),aPIm->Image()));
   *(aPIm->Saisie()) = aS;
   ToExe.pop_back();

   RedrawAllWindows();
}