Skip to content

Commit

Permalink
Merge pull request #103 from scdmitryvodich/DockedPaneNotVisible
Browse files Browse the repository at this point in the history
Fix #101 and new fix for #81 with docked pane becomes not visible.
  • Loading branch information
Dirkster99 authored Jan 21, 2020
2 parents a7cae4c + 3c30617 commit 41a7bc9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 0 additions & 4 deletions source/Components/AvalonDock/Controls/LayoutGridControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -600,10 +600,6 @@ public virtual void AdjustFixedChildrenPanelSizes(Size? parentSize = null)
{
child.AdjustFixedChildrenPanelSizes(availableSize);
}

// #81 - Make parents update their children up the tree. Otherwise, they will not be redrawn.
if (parentSize == null)
_model.RaiseChildrenTreeChanged();
}

private FrameworkElement GetNextVisibleChild(int index)
Expand Down
12 changes: 11 additions & 1 deletion source/Components/AvalonDock/Layout/LayoutGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,17 @@ private void _children_CollectionChanged(object sender, System.Collections.Speci

ComputeVisibility();
OnChildrenCollectionChanged();
NotifyChildrenTreeChanged(ChildrenTreeChange.DirectChildrenChanged);

if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
{
// #81 - Make parents update their children up the tree. Otherwise, they will not be redrawn.
RaiseChildrenTreeChanged();
}
else
{
NotifyChildrenTreeChanged(ChildrenTreeChange.DirectChildrenChanged);
}

RaisePropertyChanged("ChildrenCount");
}

Expand Down

0 comments on commit 41a7bc9

Please sign in to comment.