Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions Src/Common/Controls/DetailControls/Slice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2241,19 +2241,30 @@ public Slice ExpandSubItem(int hvo)
for (int islice = IndexInContainer + 1; islice < cslice; ++islice)
{
var slice = ContainingDataTree.Slices[islice];
// Stop if we get past the children of the current object.
if (!EmbeddedSlice(slice))
break;
if (slice.Object.Hvo == hvo)
{
if (slice.Expansion == DataTree.TreeItemState.ktisCollapsed)
slice.TreeNode.ToggleExpansion(islice);
return slice;
}
// Stop if we get past the children of the current object.
if (slice.Indent <= Indent)
break;
}
return null;
}

private bool EmbeddedSlice(Slice slice)
{
foreach (object obj in Key)
{
var node = obj as XmlNode;
if (IsRefPartNode(node) && !slice.Key.Contains(node))
return false;
}
return true;
}


/// <summary>
/// Return true if the target array starts with the objects in the match array.
Expand Down
Loading