Index: /trunk/FACT++/gui/FactGui.h
===================================================================
--- /trunk/FACT++/gui/FactGui.h	(revision 11085)
+++ /trunk/FACT++/gui/FactGui.h	(revision 11086)
@@ -187,5 +187,4 @@
         gStyle->SetPalette(fPalette.size(), fPalette.data());
 
-
         const double r   = double(gPad->GetWw())/gPad->GetWh();
         const double max = 20.5; // 20.5 rings in x and y
@@ -196,4 +195,7 @@
             gPad->Range(-max, -max/r, max, max/r);
 
+        Double_t x1, x2, y1, y2;
+        gPad->GetRange(x1, x2, y1, y2);
+
         double dmin = fData[0];
         double dmax = fData[0];
@@ -212,7 +214,4 @@
         const double min   = dmin;
         const double scale = dmax==dmin ? 1 : dmax-dmin;
-
-//        const double min   = fData.min();
-//        const double scale = fData.max()==fData.min() ? 1 : fData.max()-fData.min();
 
         TAttFill fill(0, 1001);
@@ -314,6 +313,6 @@
         static string       str;
 
-        const float x = gPad->PadtoX(gPad->AbsPixeltoX(px));
-        const float y = gPad->PadtoY(gPad->AbsPixeltoY(py));
+        const float x = gPad->AbsPixeltoX(px);
+        const float y = gPad->AbsPixeltoY(py);
 
         const int idx = GetIdx(x, y);
@@ -331,6 +330,6 @@
     Int_t DistancetoPrimitive(Int_t px, Int_t py)
     {
-        const float x = gPad->PadtoX(gPad->AbsPixeltoX(px));
-        const float y = gPad->PadtoY(gPad->AbsPixeltoY(py));
+        const float x = gPad->AbsPixeltoX(px);
+        const float y = gPad->AbsPixeltoY(py);
 
         return GetIdx(x, y)>=0 ? 0 : 99999;
@@ -1860,5 +1859,5 @@
 
 #ifdef HAVE_ROOT
-    void slot_RootEventProcessed(TObject *obj, unsigned int evt, TCanvas *)
+    void slot_RootEventProcessed(TObject *obj, unsigned int evt, TCanvas *canv)
     {
         // kMousePressEvent       // TCanvas processed QEvent mousePressEvent
@@ -1878,6 +1877,6 @@
             if (dynamic_cast<Camera*>(obj))
             {
-                const float xx = gPad->PadtoX(gPad->AbsPixeltoX(tipped->GetEventX()));
-                const float yy = gPad->PadtoY(gPad->AbsPixeltoY(tipped->GetEventY()));
+                const float xx = canv->AbsPixeltoX(tipped->GetEventX());
+                const float yy = canv->AbsPixeltoY(tipped->GetEventY());
 
                 Camera *cam = static_cast<Camera*>(obj);
@@ -1894,6 +1893,6 @@
             if (dynamic_cast<Camera*>(obj))
             {
-                const float xx = gPad->PadtoX(gPad->AbsPixeltoX(tipped->GetEventX()));
-                const float yy = gPad->PadtoY(gPad->AbsPixeltoY(tipped->GetEventY()));
+                const float xx = canv->AbsPixeltoX(tipped->GetEventX());
+                const float yy = canv->AbsPixeltoY(tipped->GetEventY());
 
                 Camera *cam = static_cast<Camera*>(obj);
@@ -1920,4 +1919,5 @@
         // our own GetObjectInfo which make everything a bit more
         // complicated.
+        canv->cd();
 #if ROOT_VERSION_CODE > ROOT_VERSION(5,22,00)
         const char *objectInfo =
@@ -1937,6 +1937,6 @@
         if (dynamic_cast<Camera*>(obj))
         {
-            const float xx = gPad->PadtoX(gPad->AbsPixeltoX(tipped->GetEventX()));
-            const float yy = gPad->PadtoY(gPad->AbsPixeltoY(tipped->GetEventY()));
+            const float xx = canv->AbsPixeltoX(tipped->GetEventX());
+            const float yy = canv->AbsPixeltoY(tipped->GetEventY());
 
             Camera *cam = static_cast<Camera*>(obj);
@@ -2221,4 +2221,7 @@
         }
 
+        if (l!=160)
+            cerr << "WARNING - Problems reading Trigger-Patches.txt" << endl;
+
         // --------------------------------------------------------------------------
 
@@ -2249,4 +2252,7 @@
         }
 
+        if (l!=1440)
+            cerr << "WARNING - Problems reading MasterList-v3.txt" << endl;
+
         // --------------------------------------------------------------------------
 
@@ -2275,4 +2281,7 @@
             l++;
         }
+
+        if (l!=160)
+            cerr << "WARNING - Problems reading PatchList.txt" << endl;
 
         // --------------------------------------------------------------------------
