[vtkusers] vtkCommand::LeftButtonReleaseEvent does not work
curator
curator at gmx.de
Mon Aug 19 12:17:56 EDT 2013
Hi all (for the last time today),
recently, I caught my events by MousePress events as follows:
vtkEventQtSlotConnect *t_connections = vtkEventQtSlotConnect::New();
t_connections->Connect(
m_VTKWidget->GetRenderWindow()->GetInteractor(),
vtkCommand::MouseMoveEvent,
this,
SLOT(onCmdMouseMotion(vtkObject*)));
t_connections->Connect(
m_VTKWidget->GetRenderWindow()->GetInteractor(),
vtkCommand::LeftButtonPressEvent,
this,
SLOT(onCmdMouseLeftPress(vtkObject*)));
Both work perfectly, but unfortunatly I want to do sth, only then I
"click" or "doubleclick" on an item rather than rotate the scene.
Unfortunaly, I didnt found something like vtkCommand::DoubleClickEvent,
so I decided to add a new trigger:
t_connections->Connect( m_VTKWidget->GetRenderWindow()->GetInteractor(),
vtkCommand::LeftButtonReleaseEvent,
this,
SLOT(onCmdMouseLeftRelease(vtkObject*)));
and simply check if the mouse has not moved (except some eps) since
button press. The problem is, that this last slot does not trigger,
because onCmdMouseLeftRelease() is never called. What is the difference
between the first two and the last call?
regards,
curator
More information about the vtkusers
mailing list