<div dir="ltr"><div><div>Hi all,<br><br></div><div>   I found this series is very relevant to my issue.<br></div><div><br></div>   I am also trying to catch the LeftButtonReleaseEvent event in VTK 6.0.0. I believe it is still broken. Basically, I added observers of LeftButtonPressEvent, MouseMoveEvent, and LeftButtonReleaseEvent to RenderWindowInteractor. Only LeftButtonPressEvent and  MouseMoveEvent got tracked in the C++ callback function. No LeftButtonReleaseEvent was observed.<br>
<br></div>What I did was:<br><div><br>vtkSmartPointer&lt;CRRotateCallBack&gt; crk = vtkSmartPointer&lt;CRRotateCallBack&gt;::New();<br>     this-&gt;ui-&gt;view1-&gt;GetInteractor()-&gt;AddObserver(vtkCommand::LeftButtonPressEvent, crk, 10.0f);  this-&gt;ui-&gt;view1-&gt;GetInteractor()-&gt;AddObserver(vtkCommand::MouseMoveEvent, crk, 10.0f);        this-&gt;ui-&gt;view1-&gt;GetInteractor()-&gt;AddObserver(vtkCommand::LeftButtonReleaseEvent, crk, 10.0f);<br>
<br>class CRRotateCallBack : public vtkCommand<br>{<br>public:<br>    static CRRotateCallBack *New() {return new CRRotateCallBack;}<br><br>    virtual void Execute(vtkObject *caller, unsigned long eventId, void*)<br>    {<br>
        vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::SafeDownCast(caller);<br>        if( !iren ) return;<br><br>        if( eventId == vtkCommand::LeftButtonPressEvent )<br>        {<br>            std::cout &lt;&lt; &quot;LeftButtonPressEvent&quot; &lt;&lt; std::endl;<br>
        }<br>        else if( eventId == vtkCommand::MouseMoveEvent )<br>        {<br>            std::cout &lt;&lt; &quot;MouseMoveEvent &quot; &lt;&lt; std::endl;<br>        }<br>        else if( eventId == vtkCommand::LeftButtonReleaseEvent )    //for some reason, this left mouse release event never gets here<br>
        {<br>            std::cout &lt;&lt; &quot;LeftButtonReleaseEvent &quot; &lt;&lt; std::endl;<br>        }<br>    }<br>};<br><br></div><div>Thanks,<br></div><div>Mengda<br></div><div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Oct 31, 2011 at 4:25 PM, Sebastien Jourdain <span dir="ltr">&lt;<a href="mailto:sebastien.jourdain@kitware.com" target="_blank">sebastien.jourdain@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Max,<br>
<br>
I get that but when I was monitoring the event that was happening on a<br>
C++ observer, I&#39;ve noticed the following order.<br>
<br>
LeftButtonPressEvent<br>
StartInteractionEvent<br>
ModifiedEvent<br>
EndInteractionEvent<br>
RenderEvent<br>
<br>
So despite the fact that ReleaseEvent is not properly propagated (even<br>
in the C++ layer), I was wondering if you could rely on the<br>
EndInteractionEvent while we fix this bug ? Because, this event seems<br>
to map at the release time...<br>
<br>
Does it make sense ?<br>
<br>
At lease let me know if this could fix your issue temporarily...<br>
<br>
Thanks,<br>
<br>
Seb<br>
<br>
PS: If I get more time, I will track down the reason why the<br>
ReleaseEvent get digested...<br>
<div class=""><div class="h5"><br>
<br>
On Mon, Oct 31, 2011 at 4:16 PM, EvilMax &lt;<a href="mailto:maxim.privalov@gmail.com">maxim.privalov@gmail.com</a>&gt; wrote:<br>
&gt; Hi, Sebastien!<br>
&gt;<br>
&gt; I need to implement dragging of an actors, so I really need to track mouse<br>
&gt; button release event.<br>
&gt;<br>
&gt; --<br>
&gt; View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Mouse-button-release-is-still-broken-in-5-8-0-tp4949887p4953458.html" target="_blank">http://vtk.1045678.n5.nabble.com/Mouse-button-release-is-still-broken-in-5-8-0-tp4949887p4953458.html</a><br>

&gt; Sent from the VTK - Users mailing list archive at Nabble.com.<br>
&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br></div></div></div></div></div>