Index: /trunk/MagicSoft/Mars/mhist/MH.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MH.cc	(revision 1505)
+++ /trunk/MagicSoft/Mars/mhist/MH.cc	(revision 1506)
@@ -544,4 +544,21 @@
     gPad->Update();
 
+    TPaveText *t = (TPaveText*)gPad->FindObject("title");
+    if (t)
+    {
+        t->SetName((TString)"MHTitle");     // rename object
+        t->Clear();                         // clear old lines
+        t->AddText((TString)" "+title+" "); // add the new title
+        t->SetBit(kCanDelete);              // make sure object is deleted
+
+        //
+        // FIXME: This is a stupid workaround to hide the redrawn
+        // (see THistPainter::PaintTitle) title
+        //
+        gPad->Modified();  // indicates a change
+        gPad->Update();    // recreates the original title
+        t->Pop();          // bring our title on top
+    }
+
     //
     // Rename first statistics box
@@ -549,5 +566,5 @@
     TPaveStats &s1 = *(TPaveStats*)gPad->FindObject("stats");
     s1.SetX1NDC(s1.GetX1NDC()-0.01);
-    s1.SetName((TString)"Stat"+hist1.GetTitle());
+    s1.SetName("MHStat");
 
     //
@@ -555,5 +572,4 @@
     //
     TH1 *h2 = (TH1*)((TH1&)hist2).DrawCopy("sames");
-
     gPad->Update();
 
@@ -570,8 +586,6 @@
     const Int_t    n = s1.GetListOfLines()->GetSize();
     const Double_t h = s1.GetY2NDC()-s1.GetY1NDC();
-    TLegend &l = *new TLegend(s1.GetX1NDC(),
-                              s1.GetY1NDC()-0.015-h*2/n,
-                              s1.GetX2NDC(),
-                              s1.GetY1NDC()-0.01
+    TLegend &l = *new TLegend(s1.GetX1NDC(), s1.GetY1NDC()-0.015-h*2/n,
+                              s1.GetX2NDC(), s1.GetY1NDC()-0.01
                             );
     l.AddEntry(h1, h1->GetTitle());
@@ -582,7 +596,4 @@
     l.SetBit(kCanDelete);
 
-    // FIXME: Don't change the hist title. Change TPaveText::title
-    h1->SetTitle(" "+title+" ");
-
     l.Draw();
 }
@@ -599,8 +610,22 @@
     //
     hist1.Draw();
-    // FIXME: Don't change the hist title. Change TPaveText::title
-    //h1->SetTitle(" "+title+" ");
-
     gPad->Update();
+
+    TPaveText *t = (TPaveText*)gPad->FindObject("title");
+    if (t)
+    {
+        t->SetName((TString)"MHTitle");     // rename object
+        t->Clear();                         // clear old lines
+        t->AddText((TString)" "+title+" "); // add the new title
+        t->SetBit(kCanDelete);              // make sure object is deleted
+
+        //
+        // FIXME: This is a stupid workaround to hide the redrawn
+        // (see THistPainter::PaintTitle) title
+        //
+        gPad->Modified();  // indicates a change
+        gPad->Update();    // recreates the original title
+        t->Pop();          // bring our title on top
+    }
 
     //
