sboulema / TGit

Control TortoiseGit from within Visual Studio
MIT License
31 stars 9 forks source link

Toolbar redraw issue. #49

Open KocourKuba opened 5 years ago

KocourKuba commented 5 years ago

Too often after start VS2017, TGIT toolbar does not draw properly. http://prntscr.com/lona0i After 'Reset Toolbar' all icons draw normally. This problem occurs only with TGIT toolbar. All others drew without a problem.

sboulema commented 5 years ago

Unable to reproduce for now...

Looks like it fails/hangs on checking if there is an open vs solution under git revision and it it should enable or disable the buttons. The 'Apply Stash' button is the only button not doing that check and that one is correctly shown.

How does the TGit menu look like when this happens?

KocourKuba commented 5 years ago

Yes, looks like. Only 'Apply Stash' is visible. When I start VS and quick load solution, the toolbar does not redraw except one button 'Apply Stash'. Also, until VS not load all plugins and do own initialization (without load any project) the toolbar also not draws.

http://prntscr.com/lqr7vx http://prntscr.com/lqr8ca http://prntscr.com/lqr9k7

Possible this effect can be caused by long load plugins installed in my VS.

sboulema commented 5 years ago

I can reproduce it when opening a folder instead of a solution using Visual Studio 2019 Preview 1

But that is quite ok, since it clearly shows that it still needs to fully load the TGit extension: image

And when done loading all menu icons do appear automatically

KocourKuba commented 5 years ago

If I start VS and wait until all plugins loaded - toolbar redraws. If I start VS and load solution immediately - toolbar not redrawn (redraw only after 'Reset Toolbar' or closing solution) The same if I open a solution from the explorer window. http://prntscr.com/lu52a1

sboulema commented 5 years ago

Please try this new build: https://github.com/sboulema/TGit/releases/tag/v4.10.50

KocourKuba commented 5 years ago

Unfortunately, the issue still exists. And little worse as before. I try to disable all extensions except TGIT, but it not help. If I disable some extension, after restart VS, toolbar draws correctly. If after this exit VS and start again, toolbar not redraw. Disabling/enabling menu item in 'Add/remove button' menu redraw only selected item. All others still not drawn. Looks like VS 'cache' the state of the toolbars and not send 'update' command. I can create a video if you want to look at this

In VS2013 all works fine. Except for one thing, I create a new issue about this.

sboulema commented 5 years ago

Argh this one seems to be quite difficult, too many differences between all the different VS versions, too many async/timing issues.

Last try before the weekend: https://github.com/sboulema/TGit/releases/tag/v4.10.52

Please let me know if the Rebase button icon bug is also fixed :)

KocourKuba commented 5 years ago

No. It doesn't help. https://www.dropbox.com/s/kzs97mufzkzirnn/bandicam%202018-12-14%2017-23-43-034.mp4?dl=0

sboulema commented 5 years ago

Please try this release: https://github.com/sboulema/TGit/releases/tag/v4.10.54

KocourKuba commented 5 years ago

http://prntscr.com/lwm07n

sboulema commented 5 years ago

Time to throw away this feature branch and start looking for a new solution to the redraw issue :(

Ordisoftware commented 5 years ago

I have the same problem: icons are not drawn (sometime one or two are drawn) if I start directly a .sln file, while starting VS2017 alone works. Reseting the bar draws the icons if not drawn.

animha commented 4 years ago

Same problem on VS2019

animha commented 4 years ago

Bug is fixed after latest VS2019 update v. 16.3.8

UPDATE: after rebooting, the issue still exists. Sorry, I was too optimist.

KocourKuba commented 4 years ago

I did not confirm. The issue still exists in VS2019. image

jogibear9988 commented 2 years ago

I've also this problem most of the time...

jogibear9988 commented 2 years ago

VS2022

Ordisoftware commented 2 years ago

I found a trick that works every time because resetting the toolbar that worked in VS2017 doesn't work in VS2022: disable TGit, close VS, enable TGit, icons are there again for a while but eventually disappear again at after a few days to a few weeks I don't know yet and it seems to be linked either to swapping between solutions or to the installation of other plugins which could explain the trick that brings up the extension in the loading pile.