Index: trunk/source/visualization/management/History
===================================================================
--- trunk/source/visualization/management/History	(revision 1314)
+++ trunk/source/visualization/management/History	(revision 1315)
@@ -1,3 +1,3 @@
-$Id: History,v 1.150 2010/06/01 16:14:10 allison Exp $
+$Id: History,v 1.152 2010/06/15 16:34:43 allison Exp $
 
 -------------------------------------------------------------------
@@ -26,4 +26,17 @@
 History file for visualization management sub-category
 ------------------------------------------------------
+
+15th June 2010  John Allison  (visman-V09-03-10)
+- G4VisCommandsGeometrySet.hh: Added virtual destructors to fix
+  compilation warnings.
+- G4VisCommandsGeometrySet.cc: Changed "/vis/viewer/rebuild" to
+  "/vis/scene/notifyHandlers", the command to be executed after a
+  "/vis/geometry/..." command.  "/vis/scene/notifyHandlers" causes
+  rebuild if viewer is "auto-refresh", otherwiae a message advises a
+  rebuild.  This prevents over-enthusiatic rebuildin.
+
+3rd June 2010  John Allison  (visman-V09-03-09)
+- G4VisManager.cc: Checked valid view in DispatchToModel.
+- Changed /vis/scene/add/digiti[sz]ations to /vis/scene/add/digis.
 
 1st June 2010  John Allison  (visman-V09-03-07)
Index: trunk/source/visualization/management/include/G4VisCommandsGeometrySet.hh
===================================================================
--- trunk/source/visualization/management/include/G4VisCommandsGeometrySet.hh	(revision 1314)
+++ trunk/source/visualization/management/include/G4VisCommandsGeometrySet.hh	(revision 1315)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4VisCommandsGeometrySet.hh,v 1.3 2007/01/05 16:24:19 allison Exp $
-// GEANT4 tag $Name:  $
+// $Id: G4VisCommandsGeometrySet.hh,v 1.4 2010/06/15 16:33:55 allison Exp $
+// GEANT4 tag $Name: vis-V09-03-08 $
 
 // /vis/geometry commands - John Allison  31st January 2006
@@ -40,4 +40,5 @@
 class G4VVisCommandGeometrySetFunction {
 public:
+  virtual ~G4VVisCommandGeometrySetFunction() {}
   virtual void operator()(G4VisAttributes*) const = 0;
 };
@@ -46,4 +47,5 @@
   public G4VVisCommandGeometrySetFunction {
 public:
+  virtual ~G4VisCommandGeometrySetColourFunction() {}
   G4VisCommandGeometrySetColourFunction
   (const G4Colour& colour):
@@ -59,4 +61,5 @@
   public G4VVisCommandGeometrySetFunction {
 public:
+  virtual ~G4VisCommandGeometrySetDaughtersInvisibleFunction() {}
   G4VisCommandGeometrySetDaughtersInvisibleFunction
   (G4bool daughtersInvisible):
@@ -72,4 +75,5 @@
   public G4VVisCommandGeometrySetFunction {
 public:
+  virtual ~G4VisCommandGeometrySetForceAuxEdgeVisibleFunction() {}
   G4VisCommandGeometrySetForceAuxEdgeVisibleFunction
   (G4bool forceAuxEdgeVisible):
@@ -85,4 +89,5 @@
   public G4VVisCommandGeometrySetFunction {
 public:
+  virtual ~G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction() {}
   G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction
   (G4int lineSegmentsPerCircle):
@@ -98,4 +103,5 @@
   public G4VVisCommandGeometrySetFunction {
 public:
+  virtual ~G4VisCommandGeometrySetForceSolidFunction() {}
   G4VisCommandGeometrySetForceSolidFunction
   (G4bool forceSolid):
@@ -111,4 +117,5 @@
   public G4VVisCommandGeometrySetFunction {
 public:
+  virtual ~G4VisCommandGeometrySetForceWireframeFunction() {}
   G4VisCommandGeometrySetForceWireframeFunction
   (G4bool forceWireframe):
@@ -124,4 +131,5 @@
   public G4VVisCommandGeometrySetFunction {
 public:
+  virtual ~G4VisCommandGeometrySetLineStyleFunction() {}
   G4VisCommandGeometrySetLineStyleFunction
   (G4VisAttributes::LineStyle lineStyle):
@@ -137,4 +145,5 @@
   public G4VVisCommandGeometrySetFunction {
 public:
+  virtual ~G4VisCommandGeometrySetLineWidthFunction() {}
   G4VisCommandGeometrySetLineWidthFunction
   (G4double lineWidth):
@@ -150,4 +159,5 @@
   public G4VVisCommandGeometrySetFunction {
 public:
+  virtual ~G4VisCommandGeometrySetVisibilityFunction() {}
   G4VisCommandGeometrySetVisibilityFunction
   (G4bool visibility):
Index: trunk/source/visualization/management/include/G4VisCommandsSceneAdd.hh
===================================================================
--- trunk/source/visualization/management/include/G4VisCommandsSceneAdd.hh	(revision 1314)
+++ trunk/source/visualization/management/include/G4VisCommandsSceneAdd.hh	(revision 1315)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4VisCommandsSceneAdd.hh,v 1.20 2010/05/30 11:30:49 allison Exp $
-// GEANT4 tag $Name:  $
+// $Id: G4VisCommandsSceneAdd.hh,v 1.21 2010/06/03 10:17:44 allison Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
 
 // /vis/scene commands - John Allison  9th August 1998
@@ -63,5 +63,4 @@
   G4VisCommandSceneAddDigis& operator = (const G4VisCommandSceneAddDigis&);
   G4UIcmdWithoutParameter* fpCommand;
-  G4UIcmdWithoutParameter* fpCommandUS;
 };
 
Index: trunk/source/visualization/management/src/G4VisCommandsGeometrySet.cc
===================================================================
--- trunk/source/visualization/management/src/G4VisCommandsGeometrySet.cc	(revision 1314)
+++ trunk/source/visualization/management/src/G4VisCommandsGeometrySet.cc	(revision 1315)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4VisCommandsGeometrySet.cc,v 1.7 2007/01/05 16:24:19 allison Exp $
-// GEANT4 tag $Name:  $
+// $Id: G4VisCommandsGeometrySet.cc,v 1.8 2010/06/15 16:34:30 allison Exp $
+// GEANT4 tag $Name: vis-V09-03-08 $
 
 // /vis/geometry commands - John Allison  31st January 2006
@@ -64,5 +64,5 @@
   }
   if (fpVisManager->GetCurrentViewer()) {
-    G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/rebuild");
+    G4UImanager::GetUIpointer()->ApplyCommand("/vis/scene/notifyHandlers");
   }
 }
Index: trunk/source/visualization/management/src/G4VisCommandsSceneAdd.cc
===================================================================
--- trunk/source/visualization/management/src/G4VisCommandsSceneAdd.cc	(revision 1314)
+++ trunk/source/visualization/management/src/G4VisCommandsSceneAdd.cc	(revision 1315)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4VisCommandsSceneAdd.cc,v 1.81 2010/06/01 16:08:15 allison Exp $
-// GEANT4 tag $Name:  $
+// $Id: G4VisCommandsSceneAdd.cc,v 1.82 2010/06/03 10:17:44 allison Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
 // /vis/scene commands - John Allison  9th August 1998
 
@@ -162,19 +162,12 @@
 
 G4VisCommandSceneAddDigis::G4VisCommandSceneAddDigis () {
-  fpCommand = new G4UIcmdWithoutParameter ("/vis/scene/add/digitisations", this);
+  fpCommand = new G4UIcmdWithoutParameter ("/vis/scene/add/digis", this);
   fpCommand -> SetGuidance ("Adds digis to current scene.");
   fpCommand -> SetGuidance
     ("Digis are drawn at end of event when the scene in which"
      "\nthey are added is current.");
-
-  fpCommandUS = new G4UIcmdWithoutParameter ("/vis/scene/add/digitizations", this);
-  fpCommandUS -> SetGuidance ("Adds digis to current scene.");
-  fpCommandUS -> SetGuidance
-    ("Digis are drawn at end of event when the scene in which"
-     "\nthey are added is current.");
 }
 
 G4VisCommandSceneAddDigis::~G4VisCommandSceneAddDigis () {
-  delete fpCommandUS;
   delete fpCommand;
 }
Index: trunk/source/visualization/management/src/G4VisManager.cc
===================================================================
--- trunk/source/visualization/management/src/G4VisManager.cc	(revision 1314)
+++ trunk/source/visualization/management/src/G4VisManager.cc	(revision 1315)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4VisManager.cc,v 1.128 2010/06/01 16:08:15 allison Exp $
-// GEANT4 tag $Name:  $
+// $Id: G4VisManager.cc,v 1.129 2010/06/03 10:16:11 allison Exp $
+// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
 //
 // 
@@ -940,15 +940,17 @@
   assert (0 != trajectoryModel); // Should exist
 
-  G4TrajectoriesModel* trajectoriesModel =
-    dynamic_cast<G4TrajectoriesModel*>(fpSceneHandler->GetModel());
-  if (trajectoriesModel) {
-    if (trajectoriesModel->IsDrawingModeSet()) {
+  if (IsValidView()) {
+    G4TrajectoriesModel* trajectoriesModel =
+      dynamic_cast<G4TrajectoriesModel*>(fpSceneHandler->GetModel());
+    if (trajectoriesModel) {
+      if (trajectoriesModel->IsDrawingModeSet()) {
+	trajectoryModel->Draw(trajectory, i_mode, visible);
+      } else {
+	trajectoryModel->Draw(trajectory, visible);
+      }
+    } else {
+      // Just draw at user's request
       trajectoryModel->Draw(trajectory, i_mode, visible);
-    } else {
-      trajectoryModel->Draw(trajectory, visible);
-    }
-  } else {
-    // Just draw at user's request
-    trajectoryModel->Draw(trajectory, i_mode, visible);
+    }
   }
 }
@@ -1361,4 +1363,5 @@
     if (eventID < nEventsToBeProcessed - 1) {
       fpViewer->ShowView();
+      fpViewer->DrawView();
       fpSceneHandler->SetMarkForClearingTransientStore(true);
     } else {  // Last event...
