SetRoot() public method

public SetRoot ( MemoryElement root ) : void
root MemoryElement
return void
コード例 #1
0
        public void SetRoot(MemoryElement root)
        {
            MemoryElement oldRoot = m_Root;

            m_Root = root;
            if (m_Root != null)
            {
                m_Root.ExpandChildren();
            }
            if (m_DetailView != null)
            {
                m_DetailView.SetRoot(null);
            }

            // Attempt to restore the old state of things by walking the old tree
            if (oldRoot != null && m_Root != null)
            {
                RestoreViewState(oldRoot, m_Root);
            }
        }