I might be more useful to trigger an assertion when there are conflicting actions for the same hotkey. Maybe I'm wrong but I would think this could cause some serious issues and should be flagged as a developer error rather than try to work around the issue.
On 8/9/19 11:24 AM, Ian McInerney wrote: > 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 <[email protected] > <mailto:[email protected]>> 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 : [email protected] > <mailto:[email protected]> > > Unsubscribe : https://launchpad.net/~kicad-developers > > More help : https://help.launchpad.net/ListHelp > > > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > Post to : [email protected] > <mailto:[email protected]> > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp > > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > Post to : [email protected] > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp > _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

