]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Visualization/ImageInteractorStyle.cxx
Intermediary commit
[cpPlugins.git] / lib / cpExtensions / Visualization / ImageInteractorStyle.cxx
index 890eabb170b105537dd473ede6de3c9370149d37..f0f01b1fe76d9739026f8a246a273ec3bd3b5264 100644 (file)
@@ -30,13 +30,12 @@ AssociateImageActor( vtkImageActor* actor )
 void cpExtensions::Visualization::ImageInteractorStyle::
 OnMouseMove( )
 {
+  this->Superclass::OnMouseMove( );
+
   // Get current position on the associated actors
   vtkRenderWindowInteractor* rwi = this->GetInteractor( );
   if( rwi == NULL || this->MouseMoveCommand == NULL )
     return;
-  double pos[ 3 ];
-  if( !( this->_PickPosition( pos ) ) )
-    return;
 
   // Get modifiers
   bool alt = ( rwi->GetAltKey( ) == 1 );
@@ -44,6 +43,10 @@ OnMouseMove( )
   bool sft = ( rwi->GetShiftKey( ) == 1 );
   ButtonID button = this->GetButtonID( );
 
+  double pos[ 3 ];
+  if( !( this->_PickPosition( pos ) ) )
+    return;
+
   // Invoke possible events
   this->MouseMoveCommand( this->Data, button, pos, alt, ctr, sft );
   rwi->Render( );
@@ -103,7 +106,9 @@ OnLeftClick( )
   bool sft = ( rwi->GetShiftKey( ) == 1 );
 
   // Invoke possible events
-  this->MouseClickCommand( this->Data, Self::ButtonID_Left, pos, alt, ctr, sft );
+  this->MouseClickCommand(
+    this->Data, Self::ButtonID_Left, pos, alt, ctr, sft
+    );
   rwi->Render( );
 }
 
@@ -125,7 +130,9 @@ OnLeftDoubleClick( )
   bool sft = ( rwi->GetShiftKey( ) == 1 );
 
   // Invoke possible events
-  this->MouseDoubleClickCommand( this->Data, Self::ButtonID_Left, pos, alt, ctr, sft );
+  this->MouseDoubleClickCommand(
+    this->Data, Self::ButtonID_Left, pos, alt, ctr, sft
+    );
   rwi->Render( );
 }
 
@@ -147,7 +154,9 @@ OnMiddleClick( )
   bool sft = ( rwi->GetShiftKey( ) == 1 );
 
   // Invoke possible events
-  this->MouseClickCommand( this->Data, Self::ButtonID_Middle, pos, alt, ctr, sft );
+  this->MouseClickCommand(
+    this->Data, Self::ButtonID_Middle, pos, alt, ctr, sft
+    );
   rwi->Render( );
 }
 
@@ -169,7 +178,9 @@ OnMiddleDoubleClick( )
   bool sft = ( rwi->GetShiftKey( ) == 1 );
 
   // Invoke possible events
-  this->MouseDoubleClickCommand( this->Data, Self::ButtonID_Middle, pos, alt, ctr, sft );
+  this->MouseDoubleClickCommand(
+    this->Data, Self::ButtonID_Middle, pos, alt, ctr, sft
+    );
   rwi->Render( );
 }
 
@@ -191,7 +202,9 @@ OnRightClick( )
   bool sft = ( rwi->GetShiftKey( ) == 1 );
 
   // Invoke possible events
-  this->MouseClickCommand( this->Data, Self::ButtonID_Right, pos, alt, ctr, sft );
+  this->MouseClickCommand(
+    this->Data, Self::ButtonID_Right, pos, alt, ctr, sft
+    );
   rwi->Render( );
 }
 
@@ -213,7 +226,9 @@ OnRightDoubleClick( )
   bool sft = ( rwi->GetShiftKey( ) == 1 );
 
   // Invoke possible events
-  this->MouseDoubleClickCommand( this->Data, Self::ButtonID_Right, pos, alt, ctr, sft );
+  this->MouseDoubleClickCommand(
+    this->Data, Self::ButtonID_Right, pos, alt, ctr, sft
+    );
   rwi->Render( );
 }