Index: trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.cc
===================================================================
--- trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.cc	(revision 2161)
+++ trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.cc	(revision 2173)
@@ -49,4 +49,5 @@
 #include "MReadMarsFile.h"
 #include "MGeomCamMagic.h"
+#include "MRawEvtData.h"
 #include "MRawEvtHeader.h"
 
@@ -536,12 +537,25 @@
 //  and updates the display
 //
-void MGEvtDisplay::ReadinEvent()
-{
-    if (GetTaskList()->Process())
+void MGEvtDisplay::ReadinEvent(Int_t dir)
+{
+    MRawEvtData *raw = (MRawEvtData*)GetParList()->FindObject("MRawEvtData");
+    if (!raw)
+        return;
+    do
     {
+        if (dir<0 && !GetReader()->DecEventNum())
+            return;
+        if (dir>0 && !GetReader()->IncEventNum())
+            return;
+
+        if (!GetTaskList()->Process())
+            return;
+
         GetReader()->DecEventNum();
-        UpdateMcLabel();
-        UpdateDisplay();
-    }
+
+    } while (raw->GetNumPixels()<1);
+
+    UpdateMcLabel();
+    UpdateDisplay();
 
     fTxtEvtNr->SetText(Form("%d", GetReader()->GetNumEntry()+1));
@@ -645,11 +659,9 @@
             {
             case kEvtPrev:
-                if (GetReader()->DecEventNum())
-                    ReadinEvent();
+                ReadinEvent(-1);
                 return kTRUE;
 
             case kEvtNext:
-                if (GetReader()->IncEventNum())
-                    ReadinEvent();
+                ReadinEvent(+1);
                 return kTRUE;
             }
Index: trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.h
===================================================================
--- trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.h	(revision 2161)
+++ trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.h	(revision 2173)
@@ -44,5 +44,5 @@
 
     void SaveAsDialog() const;
-    void ReadinEvent();
+    void ReadinEvent(Int_t dir=0);
 
     Bool_t fInitOk;
Index: trunk/MagicSoft/Mars/meventdisp/MGFadcDisp.cc
===================================================================
--- trunk/MagicSoft/Mars/meventdisp/MGFadcDisp.cc	(revision 2161)
+++ trunk/MagicSoft/Mars/meventdisp/MGFadcDisp.cc	(revision 2173)
@@ -27,5 +27,5 @@
 #include <limits.h>               // INT_MAX
 #include <stdlib.h>               // atoi
-#include <iostream.h>             // cout for debugging
+#include <iostream>               // cout for debugging
 
 #include <TList.h>                // TList
@@ -51,4 +51,6 @@
 
 ClassImp(MGFadcDisp);
+
+using namespace std;
 
 enum MGFadcDispCommand
