[vtkusers] Blocking 'Q' and 'E' keys
amutka
alan.mutka at fer.hr
Mon Feb 23 13:36:39 EST 2009
Dear Shash, thank you for your answer.
I add event to interactor...
iren1->AddObserver(vtkCommand::ExitEvent,eventObserver,-5);
And I caught the ExitEvent in my eventObserver class. How can I abort event?
I'm using simple class, structure like this
void PickCommand::Execute(vtkObject *caller,unsigned long event,void *
callData)
{
switch(event)
{
case vtkCommand::PickEvent:
{
}
case vtkCommand::ExitEvent
{
....
}
}
and I make object from class
PickCommand * eventObserver = PickCommand::New();
and I simply add observer
iren1->AddObserver(vtkCommand::ExitEvent,eventObserver,-5);
Pressing Q or E Exit event is invoked but how can I block ExitMethod. I
tried to call
vtkCommand::SetAbortEvent
but i think this is wrong, I need to block interactor events and I don't
know how. I'm sorry for bothering, but I have no idea more, so please give
me another hint!
Thank you!
Alan
Bugzilla from trshash84 at gmail.com wrote:
>
> On Saturday 21 Feb 2009 5:54:14 pm Alan Mutka wrote:
>> I have problems with blocking keys Q and E witch are shutting down
>> visualization.
>> I have tried adding Observers to keys, setting ExitMethod but without
>> success.
>> Please help if you had better luck and managed to find solution!
>> Thank you!
>
> Hi
>
> The way we worked this out was to add observers directly to the interactor
> (not the style), at a priority of -5, and then calling AbortEvent on the
> command whenever the event hits.
>
> HTH
> Shash
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
--
View this message in context: http://www.nabble.com/Blocking-%27Q%27-and-%27E%27-keys-tp22135517p22167336.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list