Ignore:
Timestamp:
05/16/03 13:11:23 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mmain
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc

    r2110 r2117  
    485485//
    486486MStatusDisplay::MStatusDisplay(Long_t t)
    487 : TGMainFrame(gClient->GetRoot(), 1, 1), fTimer(this, t, kTRUE), fStatus(kLoopNone), fLog(&gLog), fLogIdx(-1), fLogTimer(this, 250, kTRUE), fLogBox(NULL)
     487: TGMainFrame(gClient->GetRoot(), 1, 1), fTimer(this, t, kTRUE), fStatus(kLoopNone), fLog(&gLog), fLogIdx(-1), fLogTimer(this, 250, kTRUE), fLogBox(NULL), fIsLocked(0)
    488488{
    489489    gROOT->GetListOfSpecials()->Add(this);
     
    758758    case kLoopStop:
    759759    case kFileExit:
    760         if (id==kFileExit && !TestBit(kIsLocked))
     760        if (id==kFileExit && !fIsLocked)
    761761            delete this;
    762762        fStatus = (Status_t)id;
     
    10751075void MStatusDisplay::SetNoContextMenu(Bool_t flag)
    10761076{
     1077    if (fIsLocked>1)
     1078        return;
     1079
    10771080    flag ? SetBit(kNoContextMenu) : ResetBit(kNoContextMenu);
    10781081    for (int i=1; i<fTab->GetNumberOfTabs(); i++)
     
    12531256void MStatusDisplay::StartUpdate(Int_t millisec)
    12541257{
     1258    if (fIsLocked>1)
     1259        return;
     1260
    12551261    if (fTimer.GetTime()<TTime(0))
    12561262        return;
     
    12641270void MStatusDisplay::StopUpdate()
    12651271{
     1272    if (fIsLocked>1)
     1273        return;
     1274
    12661275    fTimer.Stop();
    12671276}
  • trunk/MagicSoft/Mars/mmain/MStatusDisplay.h

    r2110 r2117  
    7272    FontStruct_t fFont;
    7373
     74    UInt_t fIsLocked;
     75
    7476    void AddMenuBar();
    7577    void AddProgressBar();
     
    100102    void UpdatePSHeader(const TString &name) const;
    101103
    102     enum {
    103         kIsLocked = BIT(14)
    104     };
    105104public:
    106105     MStatusDisplay(Long_t t=1000);
     
    152151     void ClearStatus() { fStatus = kLoopNone; }
    153152
    154      void Lock() { SetBit(kIsLocked); }
    155      void UnLock() { ResetBit(kIsLocked); }
     153     void Lock() { fIsLocked++; }
     154     void UnLock() { if (fIsLocked>0) fIsLocked--; }
    156155
    157156     Bool_t CheckTabForCanvas(int num) const;
Note: See TracChangeset for help on using the changeset viewer.