← Back to team overview

kicad-developers team mailing list archive

Re: [Patch] Improve tool priming for immediate context menu actions


Hi Ian,

I did some cursory testing and it looks good so I merged your patches.


> On 3 Oct 2019, at 18:07, Ian McInerney <Ian.S.McInerney@xxxxxxxx> wrote:
> For some context menu actions, there was an issue when starting the tool immediately where the first click to prime the tool would be at the menu item's position instead of where the user clicked to open the menu. The main tool I found that it happens to are the zone drawing tools (specifically the draw cutout menu item). These two patches fix that issue.
> The first patch cleans up the position handling for the tool events by including mouse positions in the command events (since it is flagged to include positions). It also implements a memory of menu positioning, so the position used for a menu selection event is the position where the root menu was opened. It also introduces a new event action type TA_PRIME that is used to represent a tool prime click event (it is generated by the tool manager using a position passed into the function).
> The second patch updates some of the Pcbnew tools to use this new framework to fix the issue of starting the drawing at the wrong position.
> -Ian
> <0001-Cleanup-position-handling-for-TOOL_EVENTs.patch><0002-pcbnew-Switch-over-some-drawing-tools-to-use-PrimeTo.patch>_______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp