Changeset 3478 for trunk/MagicSoft/Mars/mastro
- Timestamp:
- 03/11/04 18:12:50 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc
r3457 r3478 454 454 TMarker *tip=new TMarker(v0.X(), v0.Y(), kDot); 455 455 tip->SetBit(kCanDelete); 456 tip->SetBit(kCannotPick); 456 457 tip->SetMarkerColor(kWhite+type*2); 457 458 fMapG.Add((Long_t)tip, (Long_t)new TString(txt)); … … 699 700 void MAstroCatalog::EventInfo(Int_t event, Int_t px, Int_t py, TObject *selected) 700 701 { 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 701 722 if (!selected) 702 723 return;
Note:
See TracChangeset
for help on using the changeset viewer.