Index: trunk/MagicSoft/Mars/mhbase/MH.cc
===================================================================
--- trunk/MagicSoft/Mars/mhbase/MH.cc	(revision 6947)
+++ trunk/MagicSoft/Mars/mhbase/MH.cc	(revision 6948)
@@ -191,4 +191,23 @@
 // --------------------------------------------------------------------------
 //
+// Search in gPad for all objects with the name name and remove all of them
+// (TList::Remove)
+//
+void MH::RemoveFromPad(const char *name)
+{
+    if (!gPad)
+        return;
+
+    TList *list = gPad->GetListOfPrimitives();
+    if (!list)
+        return;
+
+    TObject *obj = 0;
+    while ((obj = gPad->FindObject(name)))
+        list->Remove(obj);
+}
+
+// --------------------------------------------------------------------------
+//
 // Applies a given binning to a 1D-histogram
 //
@@ -572,5 +591,7 @@
 // Tries to find a MBinning container with the name "Binning"+name
 // in the given parameter list. If it was found it is applied to the
-// given histogram. This is only valid for 1D-histograms
+// given histogram. This is only valid for 1D-histograms.
+// If the binning is found, but it IsDefault() kTRUE is returned, but
+// no binning is applied.
 //
 Bool_t MH::ApplyBinning(const MParList &plist, TString name, TH1 *h)
@@ -588,4 +609,7 @@
         return kFALSE;
     }
+
+    if (bins->IsDefault())
+        return kTRUE;
 
     SetBinning(h, bins);
Index: trunk/MagicSoft/Mars/mhbase/MH.h
===================================================================
--- trunk/MagicSoft/Mars/mhbase/MH.h	(revision 6947)
+++ trunk/MagicSoft/Mars/mhbase/MH.h	(revision 6948)
@@ -57,4 +57,6 @@
                                   UInt_t w=625, UInt_t h=440,
                                   Bool_t usescreenfactor=kFALSE);
+
+    static void RemoveFromPad(const char *name);
 
     // FIXME: * --> & !!!
