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
- 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"
#include <vtkRendererCollection.h>
#include "clitkCommon.h"
-
-vtkCxxRevisionMacro(vvInteractorStyleNavigator, "DummyRevision");
vtkStandardNewMacro(vvInteractorStyleNavigator);
//----------------------------------------------------------------------------
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);
this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
break;
- case VTKIS_PICK:
+ case VTKIS_PICK_NEW:
this->FindPokedRenderer(x, y);
this->Pick();
this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
case VTKIS_WINDOW_LEVEL:
break;
- case VTKIS_PICK:
+ case VTKIS_PICK_NEW:
break;
case VTKIS_PAN:
case VTKIS_WINDOW_LEVEL:
break;
- case VTKIS_PICK:
+ case VTKIS_PICK_NEW:
break;
case VTKIS_PAN:
// 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();
}
{
// 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
this->CurrentRenderer->UpdateLightsGeometryToFollowCamera();
}
- rwi->Render();
+ this->InvokeEvent(vtkCommand::EndInteractionEvent, this);
+
+// rwi->Render();
}
//----------------------------------------------------------------------------
}
this->CurrentRenderer->ResetCameraClippingRange();
//this->Interactor->Render();
+
+ this->InvokeEvent(vtkCommand::EndInteractionEvent, this);
}