Changeset 2377 for trunk/MagicSoft/Mars/mdatacheck
- Timestamp:
- 10/04/03 12:47:13 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mdatacheck/MGDisplayAdc.cc
r2173 r2377 99 99 fSlider = new TGVSlider(mid, 250, kSlider1|kScaleBoth, M_VSId1); 100 100 fSlider->Associate(this); 101 fSlider->SetRange(1, 577);102 101 103 102 fList->Add(fSlider); … … 258 257 259 258 // 260 // Here the initial display is set to hitogram 0259 // Here the initial display is set to entry with id 1 261 260 // 262 261 fHistoList->Select(1); … … 305 304 const Int_t nhi = fHists->GetEntries(); 306 305 306 Int_t n=1; 307 307 for (Int_t i=0; i<nhi; i++) 308 308 if (fHists->HasHi(i)) 309 fHistoList->AddEntry(fHists->GetHistHi(i)->GetName(), i+1); 309 fHistoList->AddEntry(fHists->GetHistHi(i)->GetName(), n++); 310 311 fSlider->SetRange(1, n); 310 312 311 313 fHistoList->MapSubwindows(); … … 329 331 fCanvas->Clear(); 330 332 331 const Int_t idx = selected-1;333 const Int_t idx = fHistoList->GetSelectedEntry()->EntryId(); //selected-1; 332 334 333 335 if (!fHists->HasHi(idx)) … … 414 416 415 417 if ((parm1==M_BUTTON_PREV && selected==1) || 416 (parm1==M_BUTTON_NEXT && selected== 577))418 (parm1==M_BUTTON_NEXT && selected==fHistoList->GetNumberOfEntries())) 417 419 return kTRUE; 418 420 … … 448 450 449 451 // Check for the slider movement and synchronise with TGListBox 450 if (parm2<1 || parm2> 577)452 if (parm2<1 || parm2>fHistoList->GetNumberOfEntries()) 451 453 return kTRUE; 452 454
Note:
See TracChangeset
for help on using the changeset viewer.