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

"View > Toggle word-wrap" is the same for all tabs instead if showing status for current tab #5492

Closed
pintassilgo opened this issue Apr 25, 2024 · 7 comments

Comments

@pintassilgo
Copy link

Tested with clean Cuda release.

  1. Be sure to have at least two open tabs, each one with at least one long line that can't fill in document width.
  2. By defauly, word-wrap is disabled, so "View > Toggle word-wrap" is unchecked on both tabs.
  3. Click this item to enable word-wrap for current tab.

Results:
Now, "View > Toggle word-wrap" is checked for all tabs, but word-wrap is only enabled in a single tab.

The first item of "View" menu is a captions saying "--- Current tab properties ---", so items such as "Toggle word-wrap" should reflect current tab word-wrap state.

@pintassilgo
Copy link
Author

pintassilgo commented Apr 25, 2024

Apparently, this issue affects every item under View menu, not just "Toggle word-wrap".

Tested with both Qt5 and Gtk Cuda versions.

By the way, I suggest to rename items removing "Toggle" from them. "Word-wrap", "Line numbers" and so on.

@Alexey-T
Copy link
Owner

What is missed here: setting flag FNeedUpdateMenuChecks when different tab gets focus. easy to fix.

Alexey-T added a commit that referenced this issue Apr 25, 2024
@Alexey-T
Copy link
Owner

I suggest to rename items removing "Toggle" from them. "Word-wrap", "Line numbers" and so on.

but I like it more as now. it is more structured.

@Alexey-T
Copy link
Owner

Alexey-T commented Apr 25, 2024

Note: updating of checkmarks is run on timer 'idle event'. not immedeately.

@pintassilgo
Copy link
Author

Thanks.

Not being immediately is not ideal, we can see the checkmark changing to checked/unchecked a moment after opening the menu, but it's OK, the important is now it's working.

By the way, maybe is this idle event the way to fix what I asked here? To disable "Rename" item in File menu when file is untitled (never saved).

Alexey-T added a commit that referenced this issue Apr 25, 2024
@Alexey-T
Copy link
Owner

Alexey-T commented Apr 25, 2024

To disable "Rename" item in File menu when file is untitled (never saved).

Yes, good small idea, did it now.

@pintassilgo
Copy link
Author

pintassilgo commented Apr 25, 2024

Thanks. Could this idle event trick fix the old issue #4893? It would actually be a workaround, just to minimize the issue.

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

No branches or pull requests

2 participants