Skip to content

Commit

Permalink
Candidate for fixing Issue #111
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirkster99 committed Feb 3, 2020
1 parent 897e2ea commit 64b1079
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions source/Components/AvalonDock/Layout/LayoutRoot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -677,8 +677,9 @@ public void ReadXml(XmlReader reader)
this.Hidden.Add((LayoutAnchorable)hiddenObject);
}

//Read the closing end element of LayoutRoot
reader.ReadEndElement();
//Read the closing end element of LayoutRoot
if (reader.NodeType != XmlNodeType.None)
reader.ReadEndElement();
}

public void WriteXml(XmlWriter writer)
Expand Down Expand Up @@ -1038,7 +1039,8 @@ private List<object> ReadElementList(XmlReader reader, bool isFloatingWindow)
}
}

reader.ReadEndElement();
if (reader.NodeType != XmlNodeType.None)
reader.ReadEndElement();

return resultList;
}
Expand All @@ -1051,9 +1053,10 @@ private object ReadElement(XmlReader reader)
}

if (reader.NodeType == XmlNodeType.EndElement)
{
return null;
}

if (reader.NodeType == XmlNodeType.None)
return null;

XmlSerializer serializer;
switch (reader.LocalName)
Expand Down
2 changes: 1 addition & 1 deletion source/MLibTest/MLibTest/Demos/LayoutInitializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public bool BeforeInsertAnchorable(LayoutRoot layout,
if (toolsPane != null)
{
// do not allow this as Tabbed Document
anchorableToShow.CanDockAsTabbedDocument = false;
//anchorableToShow.CanDockAsTabbedDocument = false;
toolsPane.Children.Add(anchorableToShow);
return true;
}
Expand Down

0 comments on commit 64b1079

Please sign in to comment.