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