Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Dirkster99/AvalonDock
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirkster99 committed Feb 12, 2022
2 parents 4500544 + 8e8ee7e commit 0ba1161
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 6 additions & 1 deletion source/Components/AvalonDock/Controls/LayoutDocumentItem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/************************************************************************
/************************************************************************
AvalonDock
Copyright (C) 2007-2013 Xceed Software Inc.
Expand Down Expand Up @@ -100,6 +100,11 @@ internal override void Detach()
base.Detach();
}

protected override bool CanExecuteDockAsDocumentCommand()
{
return (LayoutElement != null && LayoutElement.FindParent<LayoutDocumentPane>() != null && LayoutElement.IsFloating);
}

#endregion Overrides
}
}
1 change: 0 additions & 1 deletion source/Components/AvalonDock/Layout/LayoutContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,6 @@ public void Float()
public void DockAsDocument()
{
if (!(Root is LayoutRoot root)) throw new InvalidOperationException();
if (Parent is LayoutDocumentPane) return;

if (PreviousContainer is LayoutDocumentPane)
{
Expand Down

0 comments on commit 0ba1161

Please sign in to comment.