X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvInteractorStyleNavigator.cxx;h=8ddc4df78c71c06a24a8466ac40664ede6a9ef4a;hb=e149962cfe901eab463702d23985b32f278fd76d;hp=9d6aa104ba7324504eaca99b11397b37fd2658bf;hpb=1e034c70105f0926939acaaa27ddb46e904ae8bf;p=clitk.git diff --git a/vv/vvInteractorStyleNavigator.cxx b/vv/vvInteractorStyleNavigator.cxx index 9d6aa10..8ddc4df 100644 --- a/vv/vvInteractorStyleNavigator.cxx +++ b/vv/vvInteractorStyleNavigator.cxx @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,7 +14,7 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ +===========================================================================**/ #include "vvInteractorStyleNavigator.h" #include "vtkAbstractPropPicker.h" @@ -29,8 +29,6 @@ #include #include "clitkCommon.h" - -vtkCxxRevisionMacro(vvInteractorStyleNavigator, "DummyRevision"); vtkStandardNewMacro(vvInteractorStyleNavigator); //---------------------------------------------------------------------------- @@ -249,7 +247,10 @@ void vvInteractorStyleNavigator::OnLeftButtonDown() // Redefine this button to handle pick this->GrabFocus(this->EventCallbackCommand); - if (!this->Interactor->GetShiftKey() && !this->Interactor->GetControlKey()) { + if (this->Interactor->GetShiftKey()) { + this->OnMiddleButtonDown(); + } + else if (!this->Interactor->GetControlKey()) { this->StartPick(); } @@ -271,6 +272,9 @@ void vvInteractorStyleNavigator::OnLeftButtonUp() this->ReleaseFocus(); } break; + case VTKIS_PAN: + this->OnMiddleButtonUp(); + break; } // Call parent to handle all other states and perform additional work @@ -356,7 +360,8 @@ void vvInteractorStyleNavigator::OnChar() //Do nothing, this is handled in vvSlicerManagerCommand break; default: - this->Superclass::OnChar(); + //SR: we don't use the default vtk keys => removed to avoid conflicts + //this->Superclass::OnChar(); break; } } @@ -471,7 +476,9 @@ void vvInteractorStyleNavigator::Pan() this->CurrentRenderer->UpdateLightsGeometryToFollowCamera(); } - rwi->Render(); + this->InvokeEvent(vtkCommand::EndInteractionEvent, this); + +// rwi->Render(); } //---------------------------------------------------------------------------- @@ -556,6 +563,8 @@ void vvInteractorStyleNavigator::Dolly(double factor) } this->CurrentRenderer->ResetCameraClippingRange(); //this->Interactor->Render(); + + this->InvokeEvent(vtkCommand::EndInteractionEvent, this); }