-
Notifications
You must be signed in to change notification settings - Fork 7
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
Toolbar button is initially incorrect #13
Comments
I debugged the extension and it's immediately obvious that this is due to the package not initializing until the command is activated. @sharwell This still catches me and I've seen it catch a coworker recently. I'd love to make it autoload. What do you think? |
Auto loading packages are evil. It's just too tempting to create them. 😉 This is actually why I thought a |
At the end of the day, I like looking at the button to see if it's on. |
Alternatively, we could have two
Does that make sense? |
Sure, that's a nice workaround. I'm happy so long as I can see the state before I start debugging. To play devil's advocate, what if we minimize the startup time of the package so that autoload to set the toggled state is fine? The settings query can't take more than what, a few milliseconds? |
(I'd still want to be able to bind my keyboard shortcut to toggle, too.) |
I dare say if you convert it to be an [ProvideAutoLoad(VSConstants.UICONTEXT.SolutionExistsAndFullyLoaded_string, PackageAutoLoadFlags.BackgroundLoad)] |
Done: #15 |
Opened VS, started debugging, opened options without changing anything:
After clicking, the icon stays untoggled (because it toggled, like it is supposed to).
I think this is what was behind #12. I don't know why I worked around this so long without reporting it—keyboard shortcut makes life easy, I guess! 😄
The text was updated successfully, but these errors were encountered: