Skip to content

Commit

Permalink
BugFix Candidate for
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirkster99 committed Sep 27, 2019
1 parent c64de19 commit 82c2a62
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions source/Components/Xceed.Wpf.AvalonDock/DockingManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2399,9 +2399,10 @@ private void DockingManager_Loaded( object sender, RoutedEventArgs e )
}
_fwHiddenList.Clear();

//load windows not already loaded!
foreach( var fw in Layout.FloatingWindows.Where( fw => !_fwList.Any( fwc => fwc.Model == fw ) ) )
_fwList.Add( CreateUIElementForModel( fw ) as LayoutFloatingWindowControl );
// load floating windows not already loaded! (issue #59)
List<LayoutFloatingWindow> items = new List<LayoutFloatingWindow>(Layout.FloatingWindows.Where(fw => !_fwList.Any(fwc => fwc.Model == fw)));
foreach (var fw in items)
_fwList.Add(CreateUIElementForModel(fw) as LayoutFloatingWindowControl);

//create the overlaywindow if it's possible
if( IsVisible )
Expand Down Expand Up @@ -2976,7 +2977,9 @@ private void RemoveViewFromLogicalChild( LayoutContent layoutContent )

private void InternalSetActiveContent( object contentObject )
{
var layoutContent = Layout.Descendents().OfType<LayoutContent>().FirstOrDefault( lc => lc == contentObject || lc.Content == contentObject );
// BugFix for first issue in #59
List<LayoutContent> list = Layout.Descendents().OfType<LayoutContent>().ToList();
var layoutContent = list.FirstOrDefault( lc => lc == contentObject || lc.Content == contentObject );
_insideInternalSetActiveContent = true;
Layout.ActiveContent = layoutContent;
_insideInternalSetActiveContent = false;
Expand Down

0 comments on commit 82c2a62

Please sign in to comment.