Changeset 3478 for trunk/MagicSoft


Ignore:
Timestamp:
03/11/04 18:12:50 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc

    r3457 r3478  
    454454    TMarker *tip=new TMarker(v0.X(), v0.Y(), kDot);
    455455    tip->SetBit(kCanDelete);
     456    tip->SetBit(kCannotPick);
    456457    tip->SetMarkerColor(kWhite+type*2);
    457458    fMapG.Add((Long_t)tip, (Long_t)new TString(txt));
     
    699700void MAstroCatalog::EventInfo(Int_t event, Int_t px, Int_t py, TObject *selected)
    700701{
     702    // Try to find a corresponding object with kCannotPick set and
     703    // an available TString (for a tool tip)
     704    if (!selected || selected==this)
     705    {
     706        Long_t key, val;
     707        TExMapIter map(&fMapG);
     708        while (map.Next(key, val))
     709        {
     710            if (!val)
     711                continue;
     712
     713            TObject *o=(TObject*)key;
     714            if (o->DistancetoPrimitive(px, py)>TPad::GetMaxPickDistance())
     715                continue;
     716
     717            selected = o;
     718            break;
     719        }
     720    }
     721
    701722    if (!selected)
    702723        return;
Note: See TracChangeset for help on using the changeset viewer.