[QMS-1166] Improve custom keyboard shortcuts - #1175
Conversation
16ad533 to
a6da107
Compare
|
What's the state here? Ready for review? A rebase is necessary for sure. I would like to do a release. Should this be part? |
Yes, it's read for review. I resolved the conflicts.
Yes, that would be great :-) |
|
The branch is still in conflict. And please do not use a merge. Do a rebase as documented in the Wiki. |
Strange, it doesn't show me any conflicts anymore. I'll rebase. |
Actions with the same label in different context now can share the same keyboard shortcut
Edit/Copy/Delete were each connected to both the project and the item slot, so both ran on every trigger. Copying a project first opened a project selection dialog for an empty item list, and deleting a mixed selection deleted the items and asked to delete the project as well. Route each action through a single slot that picks project or item handling based on the current item.
This is because your button is not in the "Rebase and merge" mode. It's probably in the "Merge commit". But having all these merge commits is quite irritating. A linear commit history is much easier to read. And better for bisect searches on regressions. That said: Cleaning up the commit history by an interactive rebase is also good practice. No one wants to work their way thru a lot of back and forth commits 😉 I start the review... |
|
Ok here are the findings. I have to apologize I couldn't spend much time into review the findings. As with most AI generated stuff it has to be taken with a grain of salt. Some of the findings may render to be bogus. As far as I understood the major problem seems to be actions with no keys attached today that can get an assignment. If these actions are used by menus that disable/enable actions depending on the cause (GIS items in the workspace tree widget) it might be possible to trigger the action by key even if that does not make too much sense. And there are some topics concerning the CShortcutSetupDialog. |
Extract the enable/disable logic from slotContextMenu. When an item is selected: project actions are run for the project the item belongs to. When mixing selections, for example between item and project, no context menu will be shown anymore, as there are no common entries.
|
Any update? |
|
Thank you for the review!
Yes, I tried to address all open points. Here are the most important things I changed:
|
This is a regression. |
|
The changes in CGisListWks triggered me 😉 They make a bad readable and hard to maintain code even more unreadable and unmaintainable. (not really your fault) I asked Claude for a review and suggestion. This has not been verified by me, yet. The question is how to proceed. This is a major refactor of the code. A good chance for more regressions. Whatever the decision will be, I think I do not want to have this in the upcoming release. It's better this is merged after the release and is tested more deeply. Any preference or plan how to proceed? |
I'm not sure how to handle this properly: if the user selects both an item and a project and then opens the context menu: what should the context menu show? I see three variants:
What's your preference?
I agree. I'll try to address your review remarks. Let's merge this PR once the release is out. |
|
The current behavior without shortcuts:
I think this is the main problem as a key shortcut does not know what action is active. This is derived on the fly when summoning the menu. I think the review summary proposes a solution, but that is quite a huge change in the system. But I have to admit I am not that deep in the topic right now. Too much time since the review and too many other stuff on my mind :) |
What is the linked issue for this pull request:
QMS-1166
What you have done:
Improve custom keyboard shortcuts:
Steps to perform a simple smoke test:
Does the code comply to the coding rules and naming conventions Coding Guidelines:
Is every user facing string in a tr() macro?
Did you add the ticket number and title into the changelog? Keep the numeric order in each release block.