Index: trunk/source/visualization/OpenGL/src/G4OpenGLSceneHandler.cc
===================================================================
--- trunk/source/visualization/OpenGL/src/G4OpenGLSceneHandler.cc	(revision 932)
+++ trunk/source/visualization/OpenGL/src/G4OpenGLSceneHandler.cc	(revision 933)
@@ -160,5 +160,4 @@
 void G4OpenGLSceneHandler::AddPrimitive (const G4Polyline& line)
 {
-  printf("----1");
   G4int nPoints = line.size ();
   if (nPoints <= 0) return;
@@ -369,82 +368,21 @@
   // Draw...
    if (sizeType == world) {  // Size specified in world coordinates.
-     printf("G4OpenGLSceneHandler::AddCircleSquare  world\n");
      DrawXYPolygon (shape, size, centre, pVA);
 
    } else { // Size specified in screen (window) coordinates.
-     printf("G4OpenGLSceneHandler::AddCircleSquare  screen bitmap size:%d\n",size);
-     
-     int test=3;
-     if (test == 1) {
-          // Find window coordinates of centre...    
-     GLdouble modelMatrix[16];    
-     glGetDoublev (GL_MODELVIEW_MATRIX, modelMatrix);    
-     G4double projectionMatrix[16];    
-     glGetDoublev (GL_PROJECTION_MATRIX, projectionMatrix);    
-     GLint viewport[4];    
-     glGetIntegerv(GL_VIEWPORT,viewport);    
-     GLdouble winx, winy, winz;    
-     gluProject(centre.x(), centre.y(), centre.z(),    
-                modelMatrix, projectionMatrix, viewport,    
-                &winx, &winy, &winz);    
-     
-     // Determine ratio window:world...    
-     const G4Vector3D& viewpointDirection =
-       fpViewer -> GetViewParameters().GetViewpointDirection();
-     const G4Vector3D& up = fpViewer->GetViewParameters().GetUpVector();
-     const G4Vector3D inScreen = (up.cross(viewpointDirection)).unit();    
-     const G4Vector3D p = centre + inScreen;    
-     GLdouble winDx, winDy, winDz;    
-     gluProject(p.x(), p.y(), p.z(),    
-                modelMatrix, projectionMatrix, viewport,    
-                &winDx, &winDy, &winDz);    
-     G4double winWorldRatio = std::sqrt(std::pow(winx - winDx, 2) +    
-                                   std::pow(winy - winDy, 2));    
-     DrawXYPolygon (shape, size/winWorldRatio, centre, pVA);
-
-     } else if (test == 2) {
-//        glMatrixMode(GL_PROJECTION);
-       glPushMatrix();
-//        glLoadIdentity();
-       //       gluOrtho2D(0.0,640.0,480.0,10.0);
-       
-       //       glDisable(GL_DEPTH_TEST);
-       glRotatef (30, 0, -1, 0);
-       glRotatef (20, -1, 0, 0);
-       glRotatef (50, 0, 0, -1);
-       DrawXYPolygon (shape, size, centre, pVA);
-       
-       
-       glPopMatrix();
-       
-//        glMatrixMode(GL_MODELVIEW);
-       //       glEnable(GL_DEPTH_TEST);
-     } else if (test == 3){                 // Avec DrawPolygone, mais en forcant
-
-       glPointSize (size);       
-       glBegin (GL_POINTS);
-       glVertex3f(centre.x(),centre.y(),centre.z());
-       glEnd();
-       //Antialiasing sur les points
-       glEnable (GL_POINT_SMOOTH);
-       //Gestion de la transparence
-       glEnable(GL_BLEND);
-       glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-
-       //        const G4Point3D targetPoint
-       //          = fSceneHandler.GetScene()->GetStandardTargetPoint()
-       //          + fVP.GetCurrentTargetPoint ();
-       //        G4double radius = fSceneHandler.GetScene()->GetExtent().GetExtentRadius();
-       //        if(radius<=0.) radius = 1.;
-       //        const G4double cameraDistance = fVP.GetCameraDistance (radius);
-       //        const G4Point3D cameraPosition =
-       //          targetPoint + cameraDistance * fVP.GetViewpointDirection().unit();
-     } else {
-       glRasterPos3d(centre.x(),centre.y(),centre.z());
-       const GLubyte* marker =
-         G4OpenGLBitMapStore::GetBitMap(shape, size, filled);
-       glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-       glBitmap(GLsizei(size), GLsizei(size), size/2., size/2., 0., 0., marker);
-     }
+     glPointSize (size);       
+     glBegin (GL_POINTS);
+     glVertex3f(centre.x(),centre.y(),centre.z());
+     glEnd();
+     //Antialiasing
+     glEnable (GL_POINT_SMOOTH);
+     //Transparency
+     glEnable(GL_BLEND);
+     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+     //        glRasterPos3d(centre.x(),centre.y(),centre.z());
+     //        const GLubyte* marker =
+     //          G4OpenGLBitMapStore::GetBitMap(shape, size, filled);
+     //        glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+     //        glBitmap(GLsizei(size), GLsizei(size), size/2., size/2., 0., 0., marker);
    }
 }
Index: trunk/source/visualization/management/History
===================================================================
--- trunk/source/visualization/management/History	(revision 932)
+++ trunk/source/visualization/management/History	(revision 933)
@@ -1,3 +1,3 @@
-$Id: History,v 1.115 2009/01/22 15:39:55 lgarnier Exp $
+$Id: History,v 1.116 2009/02/25 18:28:00 lgarnier Exp $
 
 -------------------------------------------------------------------
@@ -26,4 +26,7 @@
 History file for visualization management sub-category
 ------------------------------------------------------
+
+25th February 2009  Laurent Garnier
+- Notify handler send by G4VVisManager is implemented in G4VisManager
 
 22th January 2009  Laurent Garnier
Index: trunk/source/visualization/management/include/G4VisManager.hh
===================================================================
--- trunk/source/visualization/management/include/G4VisManager.hh	(revision 932)
+++ trunk/source/visualization/management/include/G4VisManager.hh	(revision 933)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4VisManager.hh,v 1.69 2009/01/13 09:55:15 lgarnier Exp $
+// $Id: G4VisManager.hh,v 1.70 2009/02/25 18:28:00 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
@@ -300,4 +300,9 @@
   void GeometryHasChanged ();
   // Used by run manager to notify change.
+
+  void NotifyHandlers();
+  // Notify scene handlers (G4VGraphicsScene objects) that the scene
+  // has changed so that they may rebuild their graphics database, if
+  // any, and redraw all views.
 
   void DispatchToModel(const G4VTrajectory&, G4int i_mode);
Index: trunk/source/visualization/management/src/G4VisManager.cc
===================================================================
--- trunk/source/visualization/management/src/G4VisManager.cc	(revision 932)
+++ trunk/source/visualization/management/src/G4VisManager.cc	(revision 933)
@@ -24,5 +24,5 @@
 // ********************************************************************
 //
-// $Id: G4VisManager.cc,v 1.116 2009/01/13 09:55:15 lgarnier Exp $
+// $Id: G4VisManager.cc,v 1.117 2009/02/25 18:28:00 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
@@ -800,4 +800,35 @@
 
 }
+void G4VisManager::NotifyHandlers () {
+
+  if (fVerbosity >= confirmations) {
+    G4cout << "G4VisManager::NotifyHandler() called." << G4endl;
+  }
+
+  // Check scenes.
+  G4SceneList& sceneList = fSceneList;
+  G4int iScene, nScenes = sceneList.size ();
+  for (iScene = 0; iScene < nScenes; iScene++) {
+    G4Scene* pScene = sceneList [iScene];
+    std::vector<G4VModel*>& modelList = pScene -> SetRunDurationModelList ();
+    
+    if (modelList.size ()) {
+      pScene->CalculateExtent();
+      G4UImanager::GetUIpointer () ->
+        ApplyCommand (G4String("/vis/scene/notifyHandlers " + pScene->GetName()));
+    }
+  }
+
+  // Check the manager's current scene...
+  if (fpScene && fpScene -> GetRunDurationModelList ().size () == 0) {
+    if (fVerbosity >= warnings) {
+      G4cout << "WARNING: The current scene \""
+	     << fpScene -> GetName ()
+	     << "\" has no models."
+	     << G4endl;
+    }
+  }
+
+}
 
 G4bool G4VisManager::FilterTrajectory(const G4VTrajectory& trajectory)
Index: trunk/source/visualization/modeling/include/G4ModelApplyCommandsT.hh
===================================================================
--- trunk/source/visualization/modeling/include/G4ModelApplyCommandsT.hh	(revision 932)
+++ trunk/source/visualization/modeling/include/G4ModelApplyCommandsT.hh	(revision 933)
@@ -552,4 +552,5 @@
   Apply(newValue);
   G4VVisManager* visManager = G4VVisManager::GetConcreteInstance();
+  printf("G4ModelApplyCommand 8 :%d\n",visManager);
   if (visManager) visManager->NotifyHandlers();
 }
