myOtherPoint = myPoint = QPoint(x, y);
if (ForcedState != VTK_INTERACTOR_STYLE_CAMERA_NONE) {
startOperation(ForcedState);
- } else {
- if (ctrl)
- startOperation(VTK_INTERACTOR_STYLE_CAMERA_ZOOM);
- else {
- if ( myIsMidButtonDown )
+ }
+ else {
+ if (!(ctrl||shift)){
+ if (myIsMidButtonDown){
startOperation(VTK_INTERACTOR_STYLE_CAMERA_ZOOM);
- else
+ }
+ else{
startOperation(VTK_INTERACTOR_STYLE_CAMERA_ROTATE);
+ }
}
}
return;
{
myIsMidButtonDown = true;
- if (this->HasObserver(vtkCommand::MiddleButtonPressEvent))
- {
- this->InvokeEvent(vtkCommand::MiddleButtonPressEvent,NULL);
- return;
- }
+ if (this->HasObserver(vtkCommand::MiddleButtonPressEvent)) {
+ this->InvokeEvent(vtkCommand::MiddleButtonPressEvent,NULL);
+ return;
+ }
this->FindPokedRenderer(x, y);
- if (this->CurrentRenderer == NULL)
- {
- return;
- }
+ if (this->CurrentRenderer == NULL) {
+ return;
+ }
myShiftState = shift;
// finishing current viewer operation
if (State != VTK_INTERACTOR_STYLE_CAMERA_NONE) {
startOperation(ForcedState);
}
else {
- if ( myIsLeftButtonDown )
- startOperation(VTK_INTERACTOR_STYLE_CAMERA_ZOOM);
- else
- startOperation(VTK_INTERACTOR_STYLE_CAMERA_PAN);
+ if (!(ctrl||shift)){
+ if ( myIsLeftButtonDown ){
+ startOperation(VTK_INTERACTOR_STYLE_CAMERA_ZOOM);
+ }
+ else{
+ startOperation(VTK_INTERACTOR_STYLE_CAMERA_PAN);
+ }
+ }
}
}