-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
[macOS] Fix updating editor tab titles in the dock menu. #86290
Conversation
I'm not entirely sure what's going on here. Where do these non-existent items come from? I think we should fix that instead. Also, if I understand the hack correctly, adding and removing 1 would be sufficient, it doesn't have to be 100? We just need to differentiate between actual index 0 and nothing being cast to 0? If we keep the hack, worth adding a code comment to explain it. cc @kitbdev. |
Yes, it's only to detect empty meta (which is cast to zero). |
How do we get into this situation? The point of separating update methods was to avoid calling some of the routines if the number of tabs didn't change. If we call |
The only scenario I can think of that would cause the counts to not be the same is if |
Actually the fix is much simpler, the core reason: first tab was added before connecting signals and most of the editor initialized, so first update is always called when it's already 1 == 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that makes sense now. Thanks for looking into this!
Thanks! |
Fixes errors cause by
update_tab_titles
trying to update non-existing global menu items.