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

The fix for https://bugs.launchpad.net/calibre/+bug/2092643 isn't … #2590

Merged
merged 4 commits into from
Dec 30, 2024

Conversation

cbhaley
Copy link
Contributor

@cbhaley cbhaley commented Dec 29, 2024

…enough. Sometimes Qt opens the "wrong" editor on a column with a dialog for an editor, which remains open because closeEditor doesn't close them properly. You can see this by pressing Tab twice rapidly, which can nullify the effects of the singleShot timer.

This fix prevents these "wrong" dialogs from opening. It also fixes the original issue in the bug because the currentIndex() isn't incorrectly changed.

…ugh. Sometimes Qt opens the "wrong" editor on a column with a dialog for an editor, which remains open because closeEditor doesn't close them properly. You can see this by pressing Tab twice rapidly, which can nullify the effects of the singleShot timer.

This fix prevents these "wrong" dialogs from opening. It also fixes the original issue in the bug because the currentIndex() isn't incorrectly changed.
@cbhaley
Copy link
Contributor Author

cbhaley commented Dec 29, 2024

I pushed a more elegant implementation of the changes to delegates.py, using inheritance instead of adding the function in all the createEditor() instances.

@kovidgoyal
Copy link
Owner

With this change tabbing past a column that does not have an editor such
as the size column causes subsequent columns to also not have editors.

…ng" when tabbing over read-only fields.

The problem of random dialogs is handled in delegates.py. Losing "editing" when tabbing is handled by jumping over fields that are readonly or are implemented by a doalog. This is a behavior change. We will see whether it will result in screams of complaint.

NB: after hours of trying, this was the only solution I found to both the random dialog and the loss of editing.
@cbhaley
Copy link
Contributor Author

cbhaley commented Dec 30, 2024

New commit pushed.

This problem is a nightmare. If this push isn't acceptable then as far as I can see we must accept either the random dialogs being opened or the loss of "editing" when tabbing over a readonly field. Sigh...

@kovidgoyal kovidgoyal merged commit 392b5f5 into kovidgoyal:master Dec 30, 2024
4 checks passed
@kovidgoyal
Copy link
Owner

Looks good to me, well done!

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

Successfully merging this pull request may close these issues.

2 participants