Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate shortcut crashes Heidi #744

Closed
cautionbug opened this issue Sep 3, 2019 · 4 comments
Closed

Duplicate shortcut crashes Heidi #744

cautionbug opened this issue Sep 3, 2019 · 4 comments
Labels
Milestone

Comments

@cautionbug
Copy link

cautionbug commented Sep 3, 2019

Steps to reproduce this issue

Possibly related to #733?

i did this from the initial launch dialog, no open connections. Call stack attached.

  1. Open Preferences
  2. Go to Shortcuts
  3. Attempt to change or set a keyboard shortcut already in use.
    • Example: try setting "SQL > Reformat SQL" to Ctrl+Alt+F (by default assigned to "Various > Filter Panel")
  4. First try sets the shortcut to (None)
  5. Second try, crash:
    • Exception Class: EInvalidOperation
    • Exception Message: Cannot focus a disabled or invisible window.

Current behavior

Crash

Expected behavior

Any of these:

  1. Kill operation - Shortcut already in use by "Other Thing". Force manual removal/reset.
  2. Prompt: Shortcut already in use by "Label". Set here and clear "Other Thing"?
  3. Prompt: Shortcut already in use by "Label". Set here and switch to "Other Thing" next?

Environment

  • HeidiSQL version: 10.2.0.5683 (no newer nightly available)

bugreport.txt

@ansgarbecker ansgarbecker added this to the v10.4 milestone Sep 3, 2019
@ansgarbecker ansgarbecker modified the milestones: v11.0, v11.1 Mar 17, 2020
@ansgarbecker ansgarbecker modified the milestones: v11.1, v11.2 Nov 2, 2020
ansgarbecker added a commit that referenced this issue Dec 21, 2020
…t is assigned to another action, and prompt for confirmation in such cases.
@ansgarbecker
Copy link
Collaborator

I have now modified the shortcut editor to prompt the user if the wanted shortcut is in use by another action. So this is taken from your second idea from above:
grafik

But... this does not fix the crash you mentioned. It seems a pressed shortcut still triggers its assigned action before the shortcut editor handles it. I suppose I have to catch some message in this special dialog.

@cautionbug
Copy link
Author

Thanks for the update! i like the confirmation message.

ansgarbecker added a commit that referenced this issue Dec 22, 2020
…is open, so changes on the Shortcuts tab do not trigger some action, probably even with a crash
@ansgarbecker
Copy link
Collaborator

The next build now "suspends" the actions which listen to various shortcuts, as long as the preferences dialog is open. That should at least heal crashing shortcuts in the preferences dialog. I'll close this now, would be nice if you re-check once.

@cautionbug
Copy link
Author

cautionbug commented Dec 22, 2020

Clever bypass. i'll get the latest build and take a look. You do amazing work!

-- UPDATE --
Confirmed: i opened the Preferences dialog from the connection manager, changed some key shortcuts around, and got the message when there's a conflict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants