X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvInteractorStyleNavigator.cxx;h=f3fc53befc9cc1e1edeec2d9093b3044d18dd5c6;hb=ffcb9f130fcbcc690702c2d174d3fdb57a58671a;hp=712e069672eb324d1f883a2a3e03bcebee8d0214;hpb=573d80d0f7a17607d2ee883c21c940c0ba020282;p=clitk.git diff --git a/vv/vvInteractorStyleNavigator.cxx b/vv/vvInteractorStyleNavigator.cxx index 712e069..f3fc53b 100644 --- a/vv/vvInteractorStyleNavigator.cxx +++ b/vv/vvInteractorStyleNavigator.cxx @@ -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