Changeset 2117 for trunk/MagicSoft/Mars/mmain
- Timestamp:
- 05/16/03 13:11:23 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mmain
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc
r2110 r2117 485 485 // 486 486 MStatusDisplay::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) 488 488 { 489 489 gROOT->GetListOfSpecials()->Add(this); … … 758 758 case kLoopStop: 759 759 case kFileExit: 760 if (id==kFileExit && ! TestBit(kIsLocked))760 if (id==kFileExit && !fIsLocked) 761 761 delete this; 762 762 fStatus = (Status_t)id; … … 1075 1075 void MStatusDisplay::SetNoContextMenu(Bool_t flag) 1076 1076 { 1077 if (fIsLocked>1) 1078 return; 1079 1077 1080 flag ? SetBit(kNoContextMenu) : ResetBit(kNoContextMenu); 1078 1081 for (int i=1; i<fTab->GetNumberOfTabs(); i++) … … 1253 1256 void MStatusDisplay::StartUpdate(Int_t millisec) 1254 1257 { 1258 if (fIsLocked>1) 1259 return; 1260 1255 1261 if (fTimer.GetTime()<TTime(0)) 1256 1262 return; … … 1264 1270 void MStatusDisplay::StopUpdate() 1265 1271 { 1272 if (fIsLocked>1) 1273 return; 1274 1266 1275 fTimer.Stop(); 1267 1276 } -
trunk/MagicSoft/Mars/mmain/MStatusDisplay.h
r2110 r2117 72 72 FontStruct_t fFont; 73 73 74 UInt_t fIsLocked; 75 74 76 void AddMenuBar(); 75 77 void AddProgressBar(); … … 100 102 void UpdatePSHeader(const TString &name) const; 101 103 102 enum {103 kIsLocked = BIT(14)104 };105 104 public: 106 105 MStatusDisplay(Long_t t=1000); … … 152 151 void ClearStatus() { fStatus = kLoopNone; } 153 152 154 void Lock() { SetBit(kIsLocked); }155 void UnLock() { ResetBit(kIsLocked); }153 void Lock() { fIsLocked++; } 154 void UnLock() { if (fIsLocked>0) fIsLocked--; } 156 155 157 156 Bool_t CheckTabForCanvas(int num) const;
Note:
See TracChangeset
for help on using the changeset viewer.