[vtkusers] Callback not firing?

David Doria daviddoria+vtk at gmail.com
Mon Oct 19 14:44:43 EDT 2009


On Mon, Oct 19, 2009 at 2:02 PM, Francois Bertel
<francois.bertel at kitware.com> wrote:
> Hello,
>
> The event is listed in the doc, see Events section:
>
> http://www.vtk.org/doc/nightly/html/classvtkInteractorStyleRubberBand2D.html
>
>
> I agree that every class should clearly document which events it can
> invoke. And not only that but also the optional calldata coming with
> it: a while ago I ran grep on the VTK source tree to track down all
> events invoked with a calldata and I collected the result in the
> documentation of vtkCommand. See the part that starts with "Here is
> the list of events that may be invoked with a none NULL callData."
>
> http://www.vtk.org/doc/nightly/html/classvtkCommand.html
>
> Regards.
>

Sorry if these seem like ridiculous questions guys, but I'm still
trying to figure out what is going on.

I invoked SelectionChanged from the OnLeftButtonUp override:

void vtkInteractorStyleRubberBand2D::OnLeftButtonUp()
{
  vtkstd::cout << "Left Button Up." << vtkstd::endl;
  InvokeEvent(vtkCommand::SelectionChangedEvent);
}

My SelectionChangedCallbackFunction then gets called (which it didn't
when I didn't invoke that event), but the rubberband still does not
disappear when I release the left mouse button. I tried invoking
EndPickEvent after SelectionChangedEvent but nothing changed.

Thoughts?

Thanks,

David



More information about the vtkusers mailing list