From 6af4d895d8dc326c24e62cb1d74e828205d547d0 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 2 Mar 2023 12:01:26 +0000 Subject: [PATCH] Recalculate root if fake markers are present. Closes #2870 --- qrenderdoc/Windows/EventBrowser.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qrenderdoc/Windows/EventBrowser.cpp b/qrenderdoc/Windows/EventBrowser.cpp index ed5faa1da..00223242d 100644 --- a/qrenderdoc/Windows/EventBrowser.cpp +++ b/qrenderdoc/Windows/EventBrowser.cpp @@ -330,6 +330,10 @@ struct EventItemModel : public QAbstractItemModel for(uint32_t markerEID : fakeMarkers) CalculateTotalDuration(m_Nodes[markerEID]); + // if we had fake markers recalculate the root node for the frame + if(!fakeMarkers.empty()) + CalculateTotalDuration(m_Nodes[0]); + // Qt's item model kind of sucks and doesn't have a good way to say "all data in this column has // changed" let alone "all data has changed". dataChanged() is limited to only a group of model // indices under a single parent. Instead we just force the view itself to refresh here.