← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Insert a component in schematic, from the Library Browser, by double clicking on it

 

On 01/07/2013 12:55 PM, jp charras wrote:
> Le 07/01/2013 07:55, Dick Hollenbeck a écrit :
>> On 12/07/2012 04:20 AM, jp charras wrote:
>>> Le 04/12/2012 20:15, Dick Hollenbeck a écrit :
>>>> committed in revision 3833, with refinement.
>>>>
>>>> The part was being "parked" at the mouse position after the doubleclick, rather than
>>>> staying in drag mode.
>>>> The call wxEvent::StopPropagation() seemed to fix this, as it keeps the parent window from
>>>> seeing the doubleclick as a single click.
>>>>
>>>> This call is probably useful in our "Selection Clarification" popup menus and in the DRC
>>>> ERC dialogs, where we have this recurring problem of the event being re-interpreted in the
>>>> parent window.
>>> This call does not fix the issue under MinGW.
>>>
>>> I dug this issue, and in fact there is not bug, just an unwanted behavior:
>>> When closing a dialog (mainly ERC, DRC and recently a component
>>> selection by the library viewer on a double click), the dialog is closed
>>> by a left button mouse ckick down, and the corresponding mouse release
>>> left button event is seen by the parent after closing the dialog,
>>> because it is actually made in the parent.
>>> This event generates an usually unwanted (in this case) command (item
>>> selection, component place ...)
>>>
>>> This event can be now skipped if it is unwanted by calling
>>> EDA_DRAW_FRAME::SkipNextLeftButtonReleaseEvent() from the dialog, before
>>> closing it.
>>> ( This issue was already seen when entering a sub sheet on a double
>>> click in eeschema, and the mechanism to skip the unwanted mouse release
>>> left button event which happens in an other sheet was already existing. )
>>>
>>> The parent window does not see the double click event itself.
>>> I do not know why calling wxEvent::StopPropagation() fixes this issue
>>> under Linux, but I am thinking it was only a side effect of this call.
>>>
>>>
>>> I fixed this in rev 3838
>> JP,
>>
>> That fix in 3838 does not work for me on linux using 2.8 wx.  I still get the selection
>> clarification popmenu after double clicking on a DRC error in pcbnew.
>>
>> Dick
>>
> Very, very strange:
> I tested it on Linux (linux Ubuntu 10.10   32 bits), both with wxWidgets 
> 2.8.12 and 2.9.4, and it works for me.
> So currently, I am unable to fix your issue.
> Sorry.
>
> Can you just add your first fix (calling wxEvent::StopPropagation() ) in
> DIALOG_DRC_CONTROL::OnLeftDClickClearance( wxMouseEvent& event )
> because it seems to fix your issue (but if does not fix this issue on my 
> computer, both on W7 and Linux!).
> This call did not fix this issue on my computer (both under W7 and Ubuntu),
> but on the other hand, should not break anything.
>
> I am talking about "clearance" DRC errors.
> However, if you are talking about "Unconnected" DRC error,  I just saw I 
> forgot to add the call to
> SkipNextLeftButtonReleaseEvent();
> in DIALOG_DRC_CONTROL::OnLeftDClickUnconnected
> therefore, this issue is still existing (for me)  for unconnected DRC 
> errors.

My testing was with "Unconnected", so maybe there is hope for a unified fix.  Commit that
and I will try it soon.  Thanks.




>



References