Skip to content

Commit

Permalink
Setting ActiveContent with equivalent statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirkster99 committed Oct 5, 2019
1 parent 5be5efb commit b054943
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions source/Components/Xceed.Wpf.AvalonDock/DockingManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2331,8 +2331,6 @@ private void OnLayoutRootPropertyChanged( object sender, PropertyChangedEventArg
{
if( Layout.ActiveContent != null )
{
//Debug.WriteLine(new StackTrace().ToString());

//set focus on active element only after a layout pass is completed
//it's possible that it is not yet visible in the visual tree
//if (_setFocusAsyncOperation == null)
Expand All @@ -2346,12 +2344,9 @@ private void OnLayoutRootPropertyChanged( object sender, PropertyChangedEventArg
//}
}

//if (!_insideInternalSetActiveContent)
// ActiveContent = Layout.ActiveContent != null ?
// Layout.ActiveContent.Content : null;
if( !_insideInternalSetActiveContent && ( Layout.ActiveContent != null ) )
if( !_insideInternalSetActiveContent )
{
this.ActiveContent = Layout.ActiveContent.Content;
this.ActiveContent = ( Layout.ActiveContent != null ) ? Layout.ActiveContent.Content : null;
}
}
}
Expand Down

0 comments on commit b054943

Please sign in to comment.