Index: trunk/MagicSoft/Cosy/Changelog
===================================================================
--- trunk/MagicSoft/Cosy/Changelog	(revision 7791)
+++ trunk/MagicSoft/Cosy/Changelog	(revision 7792)
@@ -1,4 +1,10 @@
                                                                   -*-*- END -*-*-
- 2006/07/15 Daniela Dorner
+ 2006/07/16 Daniela Dorner
+
+   * main/MStarguider.[h,cc]:
+     - improvement in showing/hiding of parts of the display in the starguider
+       window
+
+
 
    * main/MStarguider.cc:
Index: trunk/MagicSoft/Cosy/main/MStarguider.cc
===================================================================
--- trunk/MagicSoft/Cosy/main/MStarguider.cc	(revision 7791)
+++ trunk/MagicSoft/Cosy/main/MStarguider.cc	(revision 7792)
@@ -331,9 +331,10 @@
 
     fGStarg = new MGStarg(this, 235);
-    fGStarg->DrawText("0.75'", "1.50'", "3.00'", "Misspointing [min]");
+    fGStarg->DrawText("0.75'", "1.50'", "3.00'", "Mispointing [min]");
     fGStarg->DrawHexagon();
     fGStarg->Move(530,596+5);
     fList->Add(fGStarg);
 
+    //RA,Dec for catalog
     fCRaDec = new MGCoordinates(this, kETypeRaDec);
     fCRaDec->Move(4, fMenu->GetDefaultHeight()+584);
@@ -341,4 +342,5 @@
     fList->Add(fCRaDec);
 
+    //telescope position
     fCZdAz = new MGCoordinates(this, kETypeZdAz, 2);
     fCZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+597);
@@ -346,4 +348,5 @@
     fList->Add(fCZdAz);
 
+    //starguider position
     fPZdAz = new MGCoordinates(this, kETypeZdAz, 2);
     fPZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+640);
@@ -351,4 +354,5 @@
     fList->Add(fPZdAz);
 
+    //mispointing
     fDZdAz = new MGCoordinates(this, kETypeZdAz, 2);
     fDZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+683);
@@ -414,24 +418,24 @@
     fList->Add(l);
 
-    l = new TGLabel(this, "Zd/Az telescope pointing at");
-    l->SetTextJustify(kTextLeft);
-    l->Move(240+12+20+7, fMenu->GetDefaultHeight()+584-5);
-    AddFrame(l);
-    fList->Add(l);
-
-    l = new TGLabel(this, "Zd/Az starguider pointing at");
-    l->SetTextJustify(kTextLeft);
-    l->Move(240+12+20+7, fMenu->GetDefaultHeight()+630+20-5-23);
-    AddFrame(l);
-    fList->Add(l);
-
-    l = new TGLabel(this, "Zd/Az misspointing");
-    l->SetTextJustify(kTextLeft);
-    l->Move(240+12+20+7, fMenu->GetDefaultHeight()+676+2*20-5-46);
-    AddFrame(l);
-    fList->Add(l);
+    fCZdAzText = new TGLabel(this, "Zd/Az telescope pointing at");
+    fCZdAzText->SetTextJustify(kTextLeft);
+    fCZdAzText->Move(240+12+20+7, fMenu->GetDefaultHeight()+584-5);
+    AddFrame(fCZdAzText);
+    fList->Add(fCZdAzText);
+
+    fPZdAzText = new TGLabel(this, "Zd/Az starguider pointing at");
+    fPZdAzText->SetTextJustify(kTextLeft);
+    fPZdAzText->Move(240+12+20+7, fMenu->GetDefaultHeight()+630+20-5-23);
+    AddFrame(fPZdAzText);
+    fList->Add(fPZdAzText);
+
+    fDZdAzText = new TGLabel(this, "Zd/Az mispointing");
+    fDZdAzText->SetTextJustify(kTextLeft);
+    fDZdAzText->Move(240+12+20+7, fMenu->GetDefaultHeight()+676+2*20-5-46);
+    AddFrame(fDZdAzText);
+    fList->Add(fDZdAzText);
 
 #ifdef EXPERT
-    l = new TGLabel(this, "Misspointing/FindStar (Experts Only!)");
+    l = new TGLabel(this, "Mispointing/FindStar (Experts Only!)");
     l->SetTextJustify(kTextLeft);
     l->Move(240+12+20, fMenu->GetDefaultHeight()+722+3*20-5);
@@ -513,6 +517,10 @@
     fGStarg->UnmapWindow();
     fGNumStars->UnmapWindow();
+    fCRaDec->UnmapWindow();
+    fCZdAz->UnmapWindow();
     fPZdAz->UnmapWindow();
+    fPZdAzText->UnmapWindow();
     fDZdAz->UnmapWindow();
+    fDZdAzText->UnmapWindow();
     fSZdAz->UnmapWindow();
     fSkyBright->UnmapWindow();
@@ -712,5 +720,16 @@
         fIntRate = 125;
 
+        //catalog
         fDisplay->CheckEntry(IDM_kCatalog);
+        fCRaDec->MapWindow();
+        fCRaDecText-MapWindow();
+        fCZdAz->MapWindow();
+        fCZdAzText->MapWindow();
+
+        fPZdAz->MapWindow();
+        fPZdAzText->MapWindow();
+        fDZdAz->MapWindow();
+        fDZdAzText->MapWindow();
+
         fGStarg->MapWindow();
         fGNumStars->MapWindow();
@@ -746,6 +765,15 @@
 
         fPZdAz->UnmapWindow();
+        fPZdAzText->UnmapWindow();
         fDZdAz->UnmapWindow();
+        fDZdAzText->UnmapWindow();
         fSkyBright->UnmapWindow();
+        //catalog
+        fCRaDec->UnmapWindow();
+        fCRaDecText-UnmapWindow();
+        fCZdAz->UnmapWindow();
+        fCZdAzText->UnmapWindow();
+        fDisplay->UnCheckEntry(IDM_kCatalog);
+
         fGStarg->UnmapWindow();
         fGNumStars->UnmapWindow();
@@ -845,4 +873,16 @@
             case IDM_kCatalog:
                 Toggle(fDisplay, IDM_kCatalog);
+                if (fDisplay->IsEntryChecked(IDM_kCatalog))
+                {
+                    fCRaDec->MapWindow();
+                    fCZdAz->MapWindow();
+                    fCZdAzText->MapWindow();
+                }
+                else
+                {
+                    fCRaDec->UnmapWindow();
+                    fCZdAz->UnmapWindow();
+                    fCZdAzText->UnmapWindow();
+                }
                 return kTRUE;
 
@@ -1855,5 +1895,5 @@
                 << star.Az()*60 << "'" << endl;
 #endif
-            fSZdAz->SetCoordinates(star); // Misspointing found from Camera
+            fSZdAz->SetCoordinates(star); // Mispointing found from Camera
 
             SendAmcTrigger("Starguider");
@@ -1969,5 +2009,5 @@
         const Ring skycenter(768/2-off.X(), 576/2+off.Y());
 
-	// There are two corrections to the misspointing
+	// There are two corrections to the mispointing
 	// - Sagging of the camera as measured with the LEDs
 	// - Star not ideally centered on MAGIC Camera
Index: trunk/MagicSoft/Cosy/main/MStarguider.h
===================================================================
--- trunk/MagicSoft/Cosy/main/MStarguider.h	(revision 7791)
+++ trunk/MagicSoft/Cosy/main/MStarguider.h	(revision 7792)
@@ -92,4 +92,7 @@
     TGLabel       *fPosZoom;
     TGLabel       *fSkyBright;
+    TGLabel       *fCZdAzText;
+    TGLabel       *fPZdAzText;
+    TGLabel       *fDZdAzText;
 
     TGButton      *fTPoint;
