# Proposal to change double click event vtk mapping

**URL:** <https://discourse.vtk.org/t/proposal-to-change-double-click-event-vtk-mapping/4120>\
**Category:** Development\
**Created:** [September 1, 2020, 8:10pm UTC](https://discourse.vtk.org/t/proposal-to-change-double-click-event-vtk-mapping/4120 "2020-09-01T20:10:18Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Davide\_Punzo](https://discourse.vtk.org/user_avatar/discourse.vtk.org/davide_punzo/32/9209_2.png) [@Davide\_Punzo](https://discourse.vtk.org/u/Davide_Punzo)\
**Post date:** [October 15, 2020, 5:34pm UTC](https://discourse.vtk.org/t/proposal-to-change-double-click-event-vtk-mapping/4120/6 "2020-10-15T17:34:42Z")

</div>

Hi @dcthomp, I could reproduce as well, thanks for reporting!

I have to say that I am not sure where the RepeatCount is increased to 1. It seems that it is required the invoke of single button press also in the double click ones, something like this:

```auto
else if (t == QEvent::MouseButtonDblClick)
    {
      switch (e2->button())
      {
        case Qt::LeftButton:
          iren->InvokeEvent(vtkCommand::LeftButtonPressEvent, e2);
          iren->InvokeEvent(vtkCommand::LeftButtonDoubleClickEvent, e2);
          break;

        case Qt::MidButton:
          iren->InvokeEvent(vtkCommand::MiddleButtonPressEvent, e2);
          iren->InvokeEvent(vtkCommand::MiddleButtonDoubleClickEvent, e2);
          break;

        case Qt::RightButton:
          iren->InvokeEvent(vtkCommand::RightButtonPressEvent, e2);
          iren->InvokeEvent(vtkCommand::RightButtonDoubleClickEvent, e2);
          break;

        default:
          break;
      }
    }

```

of course, having two signals for the same event will not be optimal.  
I’ll try to investigate asap.

---

_[View the full topic](https://discourse.vtk.org/t/proposal-to-change-double-click-event-vtk-mapping/4120)._
