[vtkusers] vtkPropPicker and vtkRenderer onStartEvent
chrisyeshi
chrisyeshi at gmail.com
Fri Jun 3 16:12:59 EDT 2011
Hi,
I have a widget that inherits vtkInteractorObserver.
I got a problem that I cannot stop the chain of events by
EventCallbackCommand->SetAbortFlag(1);
Here is the sample code:
class Widget : public vtkInteractorObserver
{
...
...
public:
virtual void SetEnabled(int enable)
{
if (enable)
{
...
Interactor->AddObserver(vtkCommand::LeftButtonPressEvent,
EventCallbackCommand);
CurrentRenderer->AddObserver(vtkCommand::StartEvent,
EventCallbackCommand);
} else
{
...
}
};
protected:
vtkPropPicker *m_picker;
vtkActor *m_actor;
virtual void onLeftButtonPress()
{
m_picker->PickProp(x, y, CurrentRenderer, m_picker->GetPickList());
EventCallbackCommand->SetAbortFlag(1); <== the application seems to
ignore this line.
};
virtual void onStartEvent()
{
vtkCamera *cam = CurrentRenderer->GetActiveCamera();
doSomething();
}
};
So, why does the application keeps sending vtkCommand::LeftButtonPressEvent
to other objects after SetAbortFlag(1)?
And it only happens when I PickProp() first, so I assume the PickProp()
fires onStartEvent, and somehow it messed up in between.
Has anybody encountered this situation?
Thanks
--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkPropPicker-and-vtkRenderer-onStartEvent-tp4452393p4452393.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list