Fix visibility bindings of undocked panels in specific cases #60
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixed two issues:
LayoutAnchorableFloatingWindowControl.cs
Added restoring of visibility binding on "activated" event.
Added possibility to disable/enable visibility bindings when docking manager gets unloaded ("unloaded" fires when switching between tabls).
DockingManager.cs
When "unloaded" fires, instead of closing all floating controls and creating them again when "loaded" fires, we transfer them to the list of hidden controls disabling their visibility bindings and event subscriptions. This solves issue 1).
LayoutAnchorableItem.cs
Added separate visibility reentrant flag for "LayoutAnchorable _anchorable". This solves case 2).
Also additional safety checks were added:
LayoutGridControl.cs - added checks for index bounds
LayoutAnchorableFloatingWindowControl.cs - added null reference check for _model.Descendents().OfType()