Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 1052)
+++ trunk/MagicSoft/Mars/Changelog	(revision 1057)
@@ -1,4 +1,14 @@
                                                                   -*-*- END -*-*-
  2001/11/08: Thomas Bretz
+
+   * meventdisp/MGCamDisplay.cc:
+     - changed enums to root style
+     - get rid of the problem of button deletion by adding the buttons 
+       as first entries to the list
+
+   * mmain/MMonteCarlo.cc:
+     - changed enums to root style
+     - get rid of the problem of button deletion by adding the buttons 
+       as first entries to the list
 
    * manalysis/MCerPhotCalc.cc, manalysis/MPedCalcPedRun.cc,
Index: trunk/MagicSoft/Mars/Makefile
===================================================================
--- trunk/MagicSoft/Mars/Makefile	(revision 1052)
+++ trunk/MagicSoft/Mars/Makefile	(revision 1057)
@@ -105,4 +105,5 @@
 mrproper:	$(MRPROPERS) rmbin rmbak rmbakmac rmhtml clean
 	@echo " Done."
+	@echo " "
 
 tar:	mrproper
Index: trunk/MagicSoft/Mars/manalysis/Makefile
===================================================================
--- trunk/MagicSoft/Mars/manalysis/Makefile	(revision 1052)
+++ trunk/MagicSoft/Mars/manalysis/Makefile	(revision 1057)
@@ -36,6 +36,6 @@
            MHillasCalc.cc \
            MCerPhotCalc.cc \
+	   MCerPhotPix.cc \
 	   MCerPhotEvt.cc \
-	   MCerPhotPix.cc \
 	   MPedCalcPedRun.cc
 
Index: trunk/MagicSoft/Mars/meventdisp/MGCamDisplay.cc
===================================================================
--- trunk/MagicSoft/Mars/meventdisp/MGCamDisplay.cc	(revision 1052)
+++ trunk/MagicSoft/Mars/meventdisp/MGCamDisplay.cc	(revision 1057)
@@ -46,7 +46,7 @@
 enum
 {
-    M_RBUT_RAW    = 0x1000,
-    M_RBUT_CLEAN  = 0x1001,
-    M_CBUT_HILLAS = 0x1002
+    kRButRawEvt,
+    kRButCleanedEvt,
+    kCButHillas
 };
 
@@ -63,7 +63,7 @@
     fList->Add(group);
 
-    TGRadioButton *but1 = new TGRadioButton(group, "Raw Events",      M_RBUT_RAW);
-    TGRadioButton *but2 = new TGRadioButton(group, "Cleaned Events",  M_RBUT_CLEAN);
-    TGCheckButton *but3 = new TGCheckButton(fTab1, "Display Ellipse", M_CBUT_HILLAS);
+    TGRadioButton *but1 = new TGRadioButton(group, "Raw Events",      kRButRawEvt);
+    TGRadioButton *but2 = new TGRadioButton(group, "Cleaned Events",  kRButCleanedEvt);
+    TGCheckButton *but3 = new TGCheckButton(fTab1, "Display Ellipse", kCButHillas);
 
     but2->SetState(kButtonDown);
@@ -73,8 +73,14 @@
     fDisplayHillas = kTRUE;
 
-    /* FXIME:
-     fList->Add(but1);
-     fList->Add(but2);
-    */
+    /*
+     WARNING:
+     Bacause of some strage and hidden dependencies the
+     GetMaiFrame call in the destructor of TGButton may fail if some
+     of the other gui elemts is deleted first.
+     AddFirst adds the buttons at the beginning of the deletion list,
+     this seems to work.
+     */
+    fList->AddFirst(but1);
+    fList->AddFirst(but2);
 
     but1->Associate(this);
@@ -223,5 +229,5 @@
             switch (parm1)
             {
-            case M_CBUT_HILLAS:
+            case kCButHillas:
                 fDisplayHillas = !fDisplayHillas;
                 UpdateDisplay();
@@ -233,10 +239,10 @@
             switch (parm1)
             {
-            case M_RBUT_RAW:
+            case kRButRawEvt:
                 fDisplayRaw = kTRUE;
                 UpdateDisplay();
                 return kTRUE;
 
-            case M_RBUT_CLEAN:
+            case kRButCleanedEvt:
                 fDisplayRaw = kFALSE;
                 UpdateDisplay();
Index: trunk/MagicSoft/Mars/mmain/MMonteCarlo.cc
===================================================================
--- trunk/MagicSoft/Mars/mmain/MMonteCarlo.cc	(revision 1052)
+++ trunk/MagicSoft/Mars/mmain/MMonteCarlo.cc	(revision 1057)
@@ -86,9 +86,15 @@
     fRadioButton1->SetState(kButtonDown);
 
-    /* FIXME:
-     fList->Add(fRadioButton1);
-     fList->Add(fRadioButton2);
-     fList->Add(fRadioButton3);
-    */
+    /*
+     WARNING:
+     Bacause of some strage and hidden dependencies the
+     GetMaiFrame call in the destructor of TGButton may fail if some
+     of the other gui elemts is deleted first.
+     AddFirst adds the buttons at the beginning of the deletion list,
+     this seems to work.
+     */
+    fList->AddFirst(fRadioButton1);
+    fList->AddFirst(fRadioButton2);
+    fList->AddFirst(fRadioButton3);
 
     //
