tgjones / gemini

Gemini is an IDE framework similar in concept to the Visual Studio Shell. It uses AvalonDock and has an MVVM architecture based on Caliburn Micro.
Other
1.1k stars 298 forks source link

Ensure tools are activated when shown, clean Tool implementation #342

Closed ReMinoer closed 2 years ago

ReMinoer commented 2 years ago

I fixed an issue on tools restored as hidden at launch but never activated at layout loading or when shown.

It's a good idea to not activate hidden tools at layout loading but we need to activate them when they are first shown in that case. IShell.ShowTool will now activate tools if they are not active, even if the tools was already registered in the IShell.Tools collection at layout loading.

I also added a IShell.RegisterTool method and also cleaned the Tool class implementation, especially properties setters.

ReMinoer commented 2 years ago

Pull request #328 originally removed activation of hidden tools at layout loading to differ it at the moment the tool will be indeed shown. Pull request #346 reverted that specific change to try to fix an issue where some tools were never activated.

This pull request revert the fix in #346 but fix the observed issue in a different way to still ensure hidden tools are only activated when they are shown. The author of #346 (@kornman00) validated this pull request.