X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvSlicerManagerCommand.cxx;h=805f51bea4bd943a23abc0ed4399d007b8dd8b8e;hb=2fc09af39b364b82ddf930be3fee40ca192218ff;hp=ab0e5f8b8835b0440a2fe170472d796cb9b9cc11;hpb=dd8a36ea0968ce26b9f25166c1c62354cbb4717b;p=clitk.git diff --git a/vv/vvSlicerManagerCommand.cxx b/vv/vvSlicerManagerCommand.cxx index ab0e5f8..805f51b 100644 --- a/vv/vvSlicerManagerCommand.cxx +++ b/vv/vvSlicerManagerCommand.cxx @@ -96,6 +96,7 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, if ( VisibleInWindow > -1 ) { if (event == vtkCommand::KeyPressEvent) { std::string KeyPress = isi->GetInteractor()->GetKeySym(); + bool bCtrlKey = isi->GetInteractor()->GetControlKey(); if (KeyPress == "Tab") { if(isi->GetInteractor()->GetShiftKey()) this->SM->PrevImage(VisibleInWindow); @@ -210,9 +211,13 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, return; } if (KeyPress == "g") { - double* cursorPos = this->SM->GetSlicer(VisibleInWindow)->GetCursorPosition(); - this->SM->GetSlicer(VisibleInWindow)->SetCurrentPosition( - cursorPos[0],cursorPos[1],cursorPos[2],cursorPos[3]); + if(bCtrlKey) + this->SM->GetSlicer(VisibleInWindow)->SetCurrentPosition(0,0,0,0); + else { + double* cursorPos = this->SM->GetSlicer(VisibleInWindow)->GetCursorPosition(); + this->SM->GetSlicer(VisibleInWindow)->SetCurrentPosition( + cursorPos[0],cursorPos[1],cursorPos[2],cursorPos[3]); + } this->SM->UpdateViews(1,VisibleInWindow); this->SM->UpdateLinked(VisibleInWindow); return;