kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #09207
Re: [PATCH] Insert a component in schematic, from the Library Browser, by double clicking on it
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
This seems like a bug in wx to me. You also?
Once an event is categorized as double click or not, it should not morph into a single
click, or even a release event.
An the wx behavior should mask any platform differences.
IMO.
References
-
[PATCH] Insert a component in schematic, from the Library Browser, by double clicking on it
From: Antia Puentes, 2012-12-03
-
Re: [PATCH] Insert a component in schematic, from the Library Browser, by double clicking on it
From: Dick Hollenbeck, 2012-12-03
-
Re: [PATCH] Insert a component in schematic, from the Library Browser, by double clicking on it
From: Antia Puentes, 2012-12-03
-
Re: [PATCH] Insert a component in schematic, from the Library Browser, by double clicking on it
From: Dick Hollenbeck, 2012-12-04
-
Re: [PATCH] Insert a component in schematic, from the Library Browser, by double clicking on it
From: jp charras, 2012-12-07