public void SetFrameDataView(HierarchyFrameDataView frameDataView)
        {
            var needReload  = !Equals(m_FrameDataView, frameDataView);
            var needSorting = frameDataView != null && frameDataView.valid &&
                              (frameDataView.sortColumn != m_MultiColumnHeader.sortedProfilerColumn ||
                               frameDataView.sortColumnAscending != m_MultiColumnHeader.sortedProfilerColumnAscending);

            if (needReload)
            {
                StoreExpandedState();
                StoreSelectedState();
            }

            m_FrameDataView = frameDataView;
            if (needSorting)
            {
                m_FrameDataView.Sort(m_MultiColumnHeader.sortedProfilerColumn, m_MultiColumnHeader.sortedProfilerColumnAscending);
            }

            if (needReload || needSorting)
            {
                m_ShouldExecuteDelayedSearch = true;
                Reload();
            }
        }
Пример #2
0
 void OnSortingChanged(MultiColumnHeader header)
 {
     if (m_FrameDataView == null || multiColumnHeader.sortedColumnIndex == -1)
     {
         return; // No column to sort for (just use the order the data are in)
     }
     m_FrameDataView.Sort(m_MultiColumnHeader.sortedProfilerColumn, m_MultiColumnHeader.sortedProfilerColumnAscending);
     Reload();
 }