src/Misc/EFTools/XmlCore/UI/ViewModels/Explorer/ExplorerSearchResults.cs
/// <summary>
///     If the element being renamed is part of the Search Results then
///     a) element may no longer be in Search Results and b) if it is
///     then the elements may need to be resorted
/// </summary>
/// <param name="elementBeingRenamed">element being renamed</param>
/// <returns>true if an element being renamed was in the Search Results</returns>
If the element being renamed is part of the Search Results then
a) element may no longer be in Search Results and b) if it is
then the elements may need to be resorted
If the element being renamed is part of the Search Results then a ) element may no longer be in Search Results and b ) if it is then the elements may need to be resorted
internal bool OnRenameElement(ExplorerEFElement elementBeingRenamed)
        {
            if (null == elementBeingRenamed)
            {
                Debug.Assert(false, typeof(ExplorerSearchResults).Name + ".RenameElement() received null elementBeingRenamed");
                return false;
            }
            if (elementBeingRenamed.IsInSearchResults)
            {
                if (!MatchesTargetString(elementBeingRenamed))
                {
                    elementBeingRenamed.IsInSearchResults = false;
                    _results.Remove(elementBeingRenamed);
                }
                SortResults();
                return true;
            }
            return false;
        }
internal bool OnRenameElement ( ExplorerEFElement elementBeingRenamed ) { if ( null == elementBeingRenamed ) { Debug . Assert ( false , typeof ( ExplorerSearchResults ) . Name + " " ) ; return false ; } if ( elementBeingRenamed . IsInSearchResults ) { if ( ! MatchesTargetString ( elementBeingRenamed ) ) { elementBeingRenamed . IsInSearchResults = false ; _results . Remove ( elementBeingRenamed ) ; } SortResults ( ) ; return true ; } return false ; }
If the element being renamed is part of the Search Results then
a) element may no longer be in Search Results and b) if it is
then the elements may need to be resorted
If the element being renamed is part of the Search Results then a ) element may no longer be in Search Results and b ) if it is then the elements may need to be resorted
// elementBeingRenamed no longer matches Target String - remove from results // need to re-sort whether element is removed from Search Results or not // because the rename may have changed the order of the Results
true if an element being renamed was in the Search Results
true if an element being renamed was in the Search Results
elementBeingRenamed
ExplorerEFElement
element being renamed
element being renamed