Ignore:
Timestamp:
10/04/03 12:47:13 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mdatacheck/MGDisplayAdc.cc

    r2173 r2377  
    9999    fSlider = new TGVSlider(mid, 250, kSlider1|kScaleBoth, M_VSId1);
    100100    fSlider->Associate(this);
    101     fSlider->SetRange(1, 577);
    102101
    103102    fList->Add(fSlider);
     
    258257
    259258    //
    260     // Here the initial display is set to hitogram 0
     259    // Here the initial display is set to entry with id 1
    261260    //
    262261    fHistoList->Select(1);
     
    305304    const Int_t nhi = fHists->GetEntries();
    306305
     306    Int_t n=1;
    307307    for (Int_t i=0; i<nhi; i++)
    308308        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);
    310312
    311313    fHistoList->MapSubwindows();
     
    329331    fCanvas->Clear();
    330332
    331     const Int_t idx = selected-1;
     333    const Int_t idx = fHistoList->GetSelectedEntry()->EntryId(); //selected-1;
    332334
    333335    if (!fHists->HasHi(idx))
     
    414416
    415417                    if ((parm1==M_BUTTON_PREV && selected==1) ||
    416                         (parm1==M_BUTTON_NEXT && selected==577))
     418                        (parm1==M_BUTTON_NEXT && selected==fHistoList->GetNumberOfEntries()))
    417419                        return kTRUE;
    418420
     
    448450
    449451        // Check for the slider movement and synchronise with TGListBox
    450         if (parm2<1 || parm2>577)
     452        if (parm2<1 || parm2>fHistoList->GetNumberOfEntries())
    451453            return kTRUE;
    452454
Note: See TracChangeset for help on using the changeset viewer.