X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvInteractorStyleNavigator.cxx;h=f3fc53befc9cc1e1edeec2d9093b3044d18dd5c6;hb=81fa2ccb7f96adb3df3f01182f9ec67cd181f859;hp=4363adf32d991c09cb9f9c07a1243c4072edad5c;hpb=0b04af7278ad344a167c4e8d99e6e67c535f0d95;p=clitk.git diff --git a/vv/vvInteractorStyleNavigator.cxx b/vv/vvInteractorStyleNavigator.cxx index 4363adf..f3fc53b 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); //---------------------------------------------------------------------------- @@ -90,14 +88,14 @@ void vvInteractorStyleNavigator::StartPick() if (this->State != VTKIS_NONE) { return; } - this->StartState(VTKIS_PICK); + this->StartState(VTKIS_PICK_NEW); this->InvokeEvent(vtkCommand::StartPickEvent, this); } //---------------------------------------------------------------------------- void vvInteractorStyleNavigator::EndPick() { - if (this->State != VTKIS_PICK) { + if (this->State != VTKIS_PICK_NEW) { return; } this->InvokeEvent(vtkCommand::EndPickEvent, this); @@ -117,7 +115,7 @@ void vvInteractorStyleNavigator::OnMouseMove() this->InvokeEvent(vtkCommand::InteractionEvent, NULL); break; - case VTKIS_PICK: + case VTKIS_PICK_NEW: this->FindPokedRenderer(x, y); this->Pick(); this->InvokeEvent(vtkCommand::InteractionEvent, NULL); @@ -153,7 +151,7 @@ void vvInteractorStyleNavigator::OnEnter() case VTKIS_WINDOW_LEVEL: break; - case VTKIS_PICK: + case VTKIS_PICK_NEW: break; case VTKIS_PAN: @@ -178,7 +176,7 @@ void vvInteractorStyleNavigator::OnLeave() case VTKIS_WINDOW_LEVEL: break; - case VTKIS_PICK: + case VTKIS_PICK_NEW: break; case VTKIS_PAN: @@ -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(); } @@ -265,12 +266,15 @@ void vvInteractorStyleNavigator::OnLeftButtonUp() { // DD("OnLeftButtonUp"); switch (this->State) { - case VTKIS_PICK: + case VTKIS_PICK_NEW: this->EndPick(); if ( this->Interactor ) { this->ReleaseFocus(); } break; + case VTKIS_PAN: + this->OnMiddleButtonUp(); + break; } // Call parent to handle all other states and perform additional work