Index: trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh
===================================================================
--- trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh	(revision 744)
+++ trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh	(revision 745)
@@ -78,6 +78,6 @@
   QString setSaveFileName(QString path);
   QString getSaveFileName();
-  enum RECORDING_STEP {WAIT=0,START,PAUSE,CONTINUE,STOP,ENCODE}; 
-  RECORDING_STEP getRecordingStep();
+  bool isRecording();
+  bool isReadyToEncode();
   bool encodeVideo();
 
@@ -113,4 +113,7 @@
 
 private:
+  enum mouseActions {STYLE1,STYLE2,STYLE3,STYLE4}; 
+  enum RECORDING_STEP {WAIT,START,PAUSE,CONTINUE,STOP,ENCODE}; 
+
   void createPopupMenu();
   void createRadioAction(QAction *,QAction *, const std::string&,unsigned int a=1);
@@ -134,5 +137,4 @@
   QMenu *fContextMenu;
 #endif
-  enum mouseActions {STYLE1,STYLE2,STYLE3,STYLE4}; 
 
   mouseActions fMouseAction; // 1: rotate 2:move 3:pick 4:shortcuts 
Index: trunk/geant4/visualization/OpenGL/src/G4OpenGLQtMovieDialog.cc
===================================================================
--- trunk/geant4/visualization/OpenGL/src/G4OpenGLQtMovieDialog.cc	(revision 744)
+++ trunk/geant4/visualization/OpenGL/src/G4OpenGLQtMovieDialog.cc	(revision 745)
@@ -240,9 +240,5 @@
 
   fButtonEncode = new QPushButton( tr( "&Encode" ),buttonBox );
-  if (fParentViewer->getRecordingStep() == G4OpenGLQtViewer::ENCODE) {
-    fButtonEncode->setEnabled(true); 
-  } else {
-    fButtonEncode->setEnabled(false); 
-  }
+  fButtonEncode->setEnabled(fParentViewer->isReadyToEncode()); 
   fButtonEncode->setAutoDefault( TRUE );
   buttonBoxLayout->addWidget(fButtonEncode);
Index: trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc
===================================================================
--- trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc	(revision 744)
+++ trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc	(revision 745)
@@ -1326,7 +1326,4 @@
   setRecordingInfos("File "+fileName+" saved");
   fRecordFrameNumber++;
-#ifdef GEANT4_QT_DEBUG
-  printf("G4OpenGLStoredQtViewer::record frame %d\n",fRecordFrameNumber);
-#endif
 }
 
@@ -2172,11 +2169,11 @@
   }
   if (fRecordingStep == WAIT) {
-    fRecordingStep = START; 
+    setRecordingStatus(START); 
   } else if (fRecordingStep == START) {
-    fRecordingStep = PAUSE;
+    setRecordingStatus(PAUSE);
   } else if (fRecordingStep == PAUSE) {
-    fRecordingStep = CONTINUE;
+    setRecordingStatus(CONTINUE);
   } else if (fRecordingStep == CONTINUE) {
-    fRecordingStep = PAUSE;
+    setRecordingStatus(PAUSE);
   }
 }
@@ -2185,4 +2182,7 @@
 void G4OpenGLQtViewer::setRecordingStatus(RECORDING_STEP step) {
   
+#ifdef GEANT4_QT_DEBUG
+  printf("setRecordingStatus \n");
+#endif
   QString txt = "";
   if (step == WAIT) {
@@ -2202,6 +2202,8 @@
   }
 
+  fRecordingStep = step;
+
   if (fMovieParametersDialog) {
-    setRecordingInfos(txt);
+    fMovieParametersDialog->setRecordingStatus(txt);
   } else {
 #if QT_VERSION < 0x040000
@@ -2216,5 +2218,5 @@
 void G4OpenGLQtViewer::setRecordingInfos(QString txt) {
   if (fMovieParametersDialog) {
-    setRecordingInfos(txt);
+    fMovieParametersDialog->setRecordingInfos(txt);
   } else {
 #if QT_VERSION < 0x040000
@@ -2277,7 +2279,20 @@
 }
 
-G4OpenGLQtViewer::RECORDING_STEP G4OpenGLQtViewer::getRecordingStep(){
-  return fRecordingStep;
-}
+
+bool G4OpenGLQtViewer::isRecording(){
+  if ((fRecordingStep == START) || (fRecordingStep == PAUSE) || (fRecordingStep == CONTINUE)) {
+    return true;
+  }
+  return false;
+}
+
+
+bool G4OpenGLQtViewer::isReadyToEncode(){
+  if (fRecordingStep == STOP) {
+    return true;
+  }
+  return false;
+}
+
 
 /**
Index: trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc
===================================================================
--- trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc	(revision 744)
+++ trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc	(revision 745)
@@ -34,5 +34,5 @@
 #ifdef G4VIS_BUILD_OPENGLQT_DRIVER
 
-//#define GEANT4_QT_DEBUG
+#define GEANT4_QT_DEBUG
 
 #include "G4OpenGLStoredQtViewer.hh"
@@ -199,10 +199,6 @@
   }
 
-  if ((getRecordingStep() == START) || (getRecordingStep() == PAUSE) || (getRecordingStep() == CONTINUE)) {
+  if (isRecording()) {
     savePPMToTemp();
-    fRecordFrameNumber++;
-#ifdef GEANT4_QT_DEBUG
-    printf("G4OpenGLStoredQtViewer::record frame %d\n",fRecordFrameNumber);
-#endif
   }
 
