Index: trunk/MagicSoft/Mars/mastro/MAstroCamera.cc
===================================================================
--- trunk/MagicSoft/Mars/mastro/MAstroCamera.cc	(revision 3519)
+++ trunk/MagicSoft/Mars/mastro/MAstroCamera.cc	(revision 3525)
@@ -275,5 +275,5 @@
                 m->SetMarkerColor(kMagenta);
                 m->SetMarkerStyle(kDot);
-                fMapG.Add((Long_t)m, 0);
+                AddMap(m);
             }
             if (h)
@@ -308,4 +308,5 @@
             gPad->Update();
             return;
+
         case kKey_Minus:
             fTime->SetMjd(fTime->GetMjd()-0.25/24);
@@ -316,5 +317,4 @@
         }
 
-    MAstroCatalog::EventInfo(event, mp1, mp2);
-    //MAstroCatalog::ExecuteEvent(event, mp1, mp2);
-}
+    MAstroCatalog::ExecuteEvent(event, mp1, mp2);
+}
Index: trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc
===================================================================
--- trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc	(revision 3519)
+++ trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc	(revision 3525)
@@ -445,5 +445,5 @@
     line->SetLineColor(kWhite+type*2);
     line->SetBit(kCannotPick);
-    fMapG.Add((Long_t)line, 0);
+    AddMap(line);
 
     const TVector2 deg = v*TMath::RadToDeg();
@@ -456,5 +456,5 @@
     tip->SetBit(kCannotPick);
     tip->SetMarkerColor(kWhite+type*2);
-    fMapG.Add((Long_t)tip, (Long_t)new TString(txt));
+    AddMap(tip, new TString(txt));
 
     return kTRUE;
@@ -585,5 +585,5 @@
     tip->SetBit(kCanDelete);
     tip->SetBit(kCannotPick);
-    fMapG.Add((Long_t)tip, (Long_t)new TString(str));
+    AddMap(tip, new TString(str));
 }
 
@@ -674,4 +674,12 @@
 }
 
+void MAstroCatalog::DrawMap()
+{
+    Long_t key, val;
+    TExMapIter map(&fMapG);
+    while (map.Next(key, val))
+        ((TObject*)key)->Draw();
+}
+
 void MAstroCatalog::Draw(Option_t *o)
 {
@@ -679,4 +687,6 @@
     AppendPad(o);
 
+    // If contents have not previously changed make sure that
+    // all primitives are recreated.
     if (!TestBit(kHasChanged))
         DrawPrimitives(o);
@@ -705,6 +715,13 @@
 void MAstroCatalog::EventInfo(Int_t event, Int_t px, Int_t py, TObject *selected)
 {
+    TCanvas *c = (TCanvas*)gTQSender;
+
+    gPad = c ? c->GetSelectedPad() : NULL;
+    if (!gPad)
+        return;
+
     // Try to find a corresponding object with kCannotPick set and
     // an available TString (for a tool tip)
+    TString *str=0;
     if (!selected || selected==this)
     {
@@ -721,4 +738,5 @@
 
             selected = o;
+            str = (TString*)val;
             break;
         }
@@ -728,20 +746,9 @@
         return;
 
-    TCanvas *c = (TCanvas*)gTQSender;
-
-    TVirtualPad* save=gPad;
-
-    gPad = c ? c->GetSelectedPad() : NULL;
-    if (!gPad)
-        return;
-
     switch (event)
     {
     case kMouseMotion:
-        {
-            TString *s = (TString*)fMapG.GetValue((Long_t)selected);
-            if (!fToolTip->IsMapped() && s)
-                ShowToolTip(px, py, *s);
-        }
+        if (!fToolTip->IsMapped() && str)
+            ShowToolTip(px, py, *str);
         break;
 
@@ -751,17 +758,8 @@
         break;
 
-    case kKeyPress: // Unresolved keyboard event
-        /*
-        switch (px)
-        {
-        case kKey_Plus:
-        case kKey_Minus:*/
-            ExecuteEvent(kKeyPress, px, py);/*
-            break;
-        }
-        break;*/
-    }
-
-    gPad=save;
+    case kKeyPress:
+        ExecuteEvent(kKeyPress, px, py);
+        break;
+    }
 }
 
@@ -815,5 +813,4 @@
     if (event==kKeyPress)
         ExecuteEventKbd(mp1, mp2);
-
 }
 
Index: trunk/MagicSoft/Mars/mastro/MAstroCatalog.h
===================================================================
--- trunk/MagicSoft/Mars/mastro/MAstroCatalog.h	(revision 3519)
+++ trunk/MagicSoft/Mars/mastro/MAstroCatalog.h	(revision 3525)
@@ -32,4 +32,5 @@
 
     TString fName;
+
 
 public:
@@ -120,4 +121,6 @@
     void ExecuteEvent(Int_t event, Int_t mp1, Int_t mp2);
 
+    void DrawMap();
+    void AddMap(void *k, void *v=0) { fMapG.Add(fMapG.GetSize(), (Long_t)k, (Long_t)v); }
     void DeleteMap()
     {
@@ -142,11 +145,4 @@
         }
         fMapG.Delete();
-    }
-    void DrawMap()
-    {
-        Long_t key, val;
-        TExMapIter map(&fMapG);
-        while (map.Next(key, val))
-            ((TObject*)key)->Draw();
     }
 
@@ -193,5 +189,5 @@
     void Draw(Option_t *o="");
 
-    void EventInfo(Int_t event, Int_t px, Int_t py, TObject *selected=0);
+    virtual void EventInfo(Int_t event, Int_t px, Int_t py, TObject *selected=0);
 
     ClassDef(MAstroCatalog, 1)
