Hi,
I'm having issuses while developing a new addin - it seems that ALL mouse event handlers (except onMouseMove[Map]), doesn't work / blocked when I draw a line in on the map.
I really need that functionality, since my tool need to ignore certain points on the polyline, indicated by ctrl+left mouse click.
Does anybody knows how can I get thouse events while drawing a line?
Thanks,
Yoav.
P.S: There's a code example:
<SPAN class="keyword token">class</SPAN> <SPAN class="token class-name">DrawLine</SPAN><SPAN class="punctuation token">(</SPAN>object<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="string token">"""Implementation for SomeToolExample.drawline (Tool)"""</SPAN>
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">__init__</SPAN><SPAN class="punctuation token">(</SPAN>self<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
self<SPAN class="punctuation token">.</SPAN>enabled <SPAN class="operator token">=</SPAN> <SPAN class="token boolean">False</SPAN>
self<SPAN class="punctuation token">.</SPAN>shape <SPAN class="operator token">=</SPAN> <SPAN class="string token">"Line"</SPAN>
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">onMouseDown</SPAN><SPAN class="punctuation token">(</SPAN>self<SPAN class="punctuation token">,</SPAN> x<SPAN class="punctuation token">,</SPAN> y<SPAN class="punctuation token">,</SPAN> button<SPAN class="punctuation token">,</SPAN> shift<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="comment token"># This DOESN'T work (blocked?) while a drawing a line</SPAN>
<SPAN class="keyword token">pass</SPAN>
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">onMouseDownMap</SPAN><SPAN class="punctuation token">(</SPAN>self<SPAN class="punctuation token">,</SPAN> x<SPAN class="punctuation token">,</SPAN> y<SPAN class="punctuation token">,</SPAN> button<SPAN class="punctuation token">,</SPAN> shift<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="comment token"># This DOESN'T work (blocked?) while a drawing a line</SPAN>
<SPAN class="keyword token">pass</SPAN>
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">onMouseUp</SPAN><SPAN class="punctuation token">(</SPAN>self<SPAN class="punctuation token">,</SPAN> x<SPAN class="punctuation token">,</SPAN> y<SPAN class="punctuation token">,</SPAN> button<SPAN class="punctuation token">,</SPAN> shift<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="comment token"># This DOESN'T work (blocked?) while a drawing a line</SPAN>
<SPAN class="keyword token">pass</SPAN>
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">onMouseUpMap</SPAN><SPAN class="punctuation token">(</SPAN>self<SPAN class="punctuation token">,</SPAN> x<SPAN class="punctuation token">,</SPAN> y<SPAN class="punctuation token">,</SPAN> button<SPAN class="punctuation token">,</SPAN> shift<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="comment token"># This DOESN'T work (blocked?) while a drawing a line</SPAN>
<SPAN class="keyword token">pass</SPAN>
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">onMouseMove</SPAN><SPAN class="punctuation token">(</SPAN>self<SPAN class="punctuation token">,</SPAN> x<SPAN class="punctuation token">,</SPAN> y<SPAN class="punctuation token">,</SPAN> button<SPAN class="punctuation token">,</SPAN> shift<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="comment token"># This is working while a drawing a line</SPAN>
<SPAN class="keyword token">pass</SPAN>
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">onMouseMoveMap</SPAN><SPAN class="punctuation token">(</SPAN>self<SPAN class="punctuation token">,</SPAN> x<SPAN class="punctuation token">,</SPAN> y<SPAN class="punctuation token">,</SPAN> button<SPAN class="punctuation token">,</SPAN> shift<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="comment token"># This is working while a drawing a line</SPAN>
<SPAN class="keyword token">pass</SPAN>
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">onDblClick</SPAN><SPAN class="punctuation token">(</SPAN>self<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="keyword token">pass</SPAN>
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">onKeyDown</SPAN><SPAN class="punctuation token">(</SPAN>self<SPAN class="punctuation token">,</SPAN> keycode<SPAN class="punctuation token">,</SPAN> shift<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="comment token"># This DOESN'T work (blocked?) while a drawing a line</SPAN>
<SPAN class="keyword token">pass</SPAN>
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">onKeyUp</SPAN><SPAN class="punctuation token">(</SPAN>self<SPAN class="punctuation token">,</SPAN> keycode<SPAN class="punctuation token">,</SPAN> shift<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="comment token"># This DOESN'T work (blocked?) while a drawing a line</SPAN>
<SPAN class="keyword token">pass</SPAN>
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">deactivate</SPAN><SPAN class="punctuation token">(</SPAN>self<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="keyword token">pass</SPAN>
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">onLine</SPAN><SPAN class="punctuation token">(</SPAN>self<SPAN class="punctuation token">,</SPAN> line_geometry<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="comment token"># Main Logic here, not important for this example</SPAN>
<SPAN class="keyword token">pass</SPAN>
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>