File tree Expand file tree Collapse file tree
Src/Common/Controls/DetailControls Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2241,19 +2241,30 @@ public Slice ExpandSubItem(int hvo)
22412241 for ( int islice = IndexInContainer + 1 ; islice < cslice ; ++ islice )
22422242 {
22432243 var slice = ContainingDataTree . Slices [ islice ] ;
2244+ // Stop if we get past the children of the current object.
2245+ if ( ! EmbeddedSlice ( slice ) )
2246+ break ;
22442247 if ( slice . Object . Hvo == hvo )
22452248 {
22462249 if ( slice . Expansion == DataTree . TreeItemState . ktisCollapsed )
22472250 slice . TreeNode . ToggleExpansion ( islice ) ;
22482251 return slice ;
22492252 }
2250- // Stop if we get past the children of the current object.
2251- if ( slice . Indent <= Indent )
2252- break ;
22532253 }
22542254 return null ;
22552255 }
22562256
2257+ private bool EmbeddedSlice ( Slice slice )
2258+ {
2259+ foreach ( object obj in Key )
2260+ {
2261+ var node = obj as XmlNode ;
2262+ if ( IsRefPartNode ( node ) && ! slice . Key . Contains ( node ) )
2263+ return false ;
2264+ }
2265+ return true ;
2266+ }
2267+
22572268
22582269 /// <summary>
22592270 /// Return true if the target array starts with the objects in the match array.
You can’t perform that action at this time.
0 commit comments