]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
To customize ResetCameraClippingRange method
authorapo <apo@opencascade.com>
Thu, 8 Sep 2005 08:13:26 +0000 (08:13 +0000)
committerapo <apo@opencascade.com>
Thu, 8 Sep 2005 08:13:26 +0000 (08:13 +0000)
src/SVTK/SVTK_Renderer.cxx
src/SVTK/SVTK_Renderer.h

index ae067194fa7e01aa3b02fb8fd97f90bc9eb26ba6..d04ad8936c66ed47fde3ac7f7c9336a4a7301537 100644 (file)
@@ -101,10 +101,13 @@ SVTK_Renderer
 
   myEventCallbackCommand->SetClientData(this);
   myEventCallbackCommand->SetCallback(SVTK_Renderer::ProcessEvents);
+  this->AddObserver(vtkCommand::ConfigureEvent,
+                   myEventCallbackCommand.GetPointer(), 
+                   myPriority);
   this->AddObserver(vtkCommand::ResetCameraEvent,
                    myEventCallbackCommand.GetPointer(), 
                    myPriority);
-  this->AddObserver(vtkCommand::ConfigureEvent,
+  this->AddObserver(vtkCommand::ResetCameraClippingRangeEvent,
                    myEventCallbackCommand.GetPointer(), 
                    myPriority);
 }
@@ -127,11 +130,12 @@ SVTK_Renderer
   case vtkCommand::ConfigureEvent:
     self->onResetView();
     break;
-  }
-  switch(theEvent){
   case vtkCommand::ResetCameraEvent:
     self->onFitAll();
     break;
+  case vtkCommand::ResetCameraClippingRangeEvent:
+    self->onResetClippingRange();
+    break;
   }
 }
 //----------------------------------------------------------------------------
@@ -422,6 +426,16 @@ SVTK_Renderer
 }
 
 
+//----------------------------------------------------------------------------
+void
+SVTK_Renderer
+::onResetClippingRange()
+{
+  return;
+  ::ResetCameraClippingRange(this);
+}
+
+
 //----------------------------------------------------------------------------
 void
 SVTK_Renderer
index 6f78b4383eadfd38fd6be988ef3733ecab12edd5..feb48827f5528339a89994f572651c8a61beb659 100644 (file)
@@ -101,6 +101,7 @@ class SVTK_EXPORT SVTK_Renderer : public SVTK_RENDERER_SUPERCLASS
 
   void onFitAll();
   void onResetView();     
+  void onResetClippingRange();
 
   void onFrontView(); 
   void onBackView();