← Back to team overview

kicad-developers team mailing list archive

Re: [Patch] Another hotkey processing fix

 

Orson,

An invalid configuration should be when there are two active global actions
that share the same hotkey, or if there are two actions in the same context
that share the same hotkey.

The issue that I was having when I made this patch was that in my cvpcb
actions rework, I not only was getting the cvpcb-specific actions I wanted,
but was also getting the pcbnew actions. I did track that down to the fact
that the pcb_actions.cpp file was being included in the cvpcb kiface, and I
was able to remove that since it is no longer used by the footprint display
frame. So this patch isn't critical to my needs anymore.

However, I think it may still be useful to make this change in the
processing.

-Ian

On Fri, Aug 9, 2019 at 12:33 PM Maciej Suminski <maciej.suminski@xxxxxxx>
wrote:

> Hi Ian,
>
> I have nothing against your patch, but is it a valid configuration where
> one has multiple global actions bound to the same hot key?
>
> Cheers,
> Orson
>
> On 8/9/19 1:16 AM, Ian McInerney wrote:
> > In the current framework, if more than one global actions share the same
> > hotkey (even if they are not all active in the current tool manager),
> > the dispatcher will only choose the final action (in what seems to be
> > alphabetical order) to run. I think that the correct behavior should
> > instead be to loop through all global actions that have the hotkey until
> > one handles it.
> >
> > The attached patch implements this change.
> >
> > -Ian
> >
> > _______________________________________________
> > 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
> >
>
> _______________________________________________
> 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
>

Follow ups

References