[vtk-developers] persistent CursorShapes & disabling interactors

Dean Inglis dean.inglis at camris.ca
Tue Mar 20 17:44:21 EDT 2007


in some widget (e.g., vtkAbstractWidget inheritors) 
implementations, there are requests
made by the superclass vtkInteractorObserver method:
void RequestCursorShape(int requestedShape).
If a widget is de-activated by key press while a
valid non-default cursor shape request has been
made and is currently active, that non-default
shape will persist.  There are a few simple solutions
but I am not sure which one is best, since the
differences seem subtle to me, and I am currently
concerned with what happens with widgets:

1) put 
      this->RequestCursorShape(VTK_CURSOR_DEFAULT) 
  in 
   a) vtkAbstractWidget::SetEnabled(int enabling)
   b) vtkInteractorObserver::OnChar()

2) put 
       if(this->ObserverMediator)
         {
         this->Observermediator->RemoveAllCursorShapeRequests(this);
         }   
   in a) or b) as above

I was thinking 2b), any thoughts?

thanks,
Dean



More information about the vtk-developers mailing list