<p style="padding:0 0 0 0; margin:0 0 0 0;">I didn't know that Menu Editor has this feature.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">I tried and my project has >160 conflicts and I can confirm what you report.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">I also noticed that it reports Alt+C (i.e. accelerators, when some caption is "_Cut" with underlined _C_).</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">And the window needs better anchoring for vertical resizing (buttons should be anchored to bottom and the groupbox to buttons).</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">V.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">______________________________________________________________<br />
> Od: "R.Smith via lazarus" <lazarus@lists.lazarus-ide.org><br />
> Komu: lazarus@lists.lazarus-ide.org<br />
> Datum: 25.05.2020 21:19<br />
> Předmět: [Lazarus] TAction and Short-cut conflicts<br />
></p>
I've been using the TActionList and TAction objects, which I think is <br />
not only making life easier, but a good design choice, and it's been <br />
working a treat.<br />
<br />
One niggle is, when I assign a short-cut to a TAction and then assign <br />
that TAction to any of the action-enabled controls, it lists the <br />
shortcut in the conflict list, which is a false positive - it's ok with <br />
a shortcut item to conflict with itself or it's own action (impossible <br />
not to, actually).<br />
<br />
To be precise - say I have a TAction named actCut to cut text, set the <br />
Shortcut to "Ctrl+X", then assign the action to one menu item in my <br />
TMainMenu, say mmnuCut (which is new and had no other properties <br />
changed), I then will see the following in my ShortCut conflict list <br />
(accessed via the Right-click in the Menu editor --> Shortcuts --> <br />
Resolve Shortcut conflicts):<br />
<br />
- Resolved Conflicts: 0<br />
<br />
- Remaining Conflicts: 1<br />
"Ctrl+X" in actCut conflicts with "Ctrl+X" in mmnuCut<br />
...<br />
<br />
What's worse, if I also assign the same Action to another menu item <br />
(which is the point of using actions) in the pop-up context menu, say <br />
puCut, I can see a three-way false-positive like this:<br />
<br />
"Ctrl+X" in actCut conflicts with "Ctrl+X" in mmnuCut<br />
"Ctrl+X" in actCut conflicts with "Ctrl+X" in puCut<br />
"Ctrl+X" in puCut conflicts with "Ctrl+X" in mmnuCut<br />
<br />
I use many Actions and shortcuts, so now resolving any REAL conflicts <br />
becomes really hard.<br />
<br />
So before I log a bug report, let me ask the community first:<br />
- Is this a bug?<br />
- Is it a feature request?<br />
- Is it a stupidity and there is some config setting I'm missing?<br />
<br />
Also, in the conflict list, if the window is resized, the inner panel <br />
does not - like someone forgot to swicth its Align from alTop to alClient.<br />
<br />
-------- Technical-----------------------------<br />
A conflict should only be positive is:<br />
1 . The conflict is NOT between a control and its own action,<br />
2. The conflict is NOT with a control which uses the same action -<br />
2.1 Unless the Shortcut does not originate from the shared Action <br />
itself.<br />
-------------------------------------------------<br />
<br />
Thank you kindly,<br />
Ryan<br />
<br />
<br />
-- <br />
_______________________________________________<br />
lazarus mailing list<br />
lazarus@lists.lazarus-ide.org<br />
<a href="https://lists.lazarus-ide.org/listinfo/lazarus">https://lists.lazarus-ide.org/listinfo/lazarus</a><br />