Skip to content

Commit

Permalink
Fix #151 with Model.Root.Manager is null when LayoutDocumentTabItem.O…
Browse files Browse the repository at this point in the history
…nModelChanged is called.
  • Loading branch information
scdmitryvodich committed Apr 20, 2020
1 parent 98eb158 commit d20fc6c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public LayoutContent Model
/// <summary>Provides derived classes an opportunity to handle changes to the <see cref="Model"/> property.</summary>
protected virtual void OnModelChanged(DependencyPropertyChangedEventArgs e)
{
SetLayoutItem(Model != null ? Model.Root.Manager.GetLayoutItemFromModel(Model) : null);
DockingManager manager = Model?.Root?.Manager;
SetLayoutItem(manager != null ? manager.GetLayoutItemFromModel(Model) : null);
//UpdateLogicalParent();
}

Expand Down

0 comments on commit d20fc6c

Please sign in to comment.