| 254 | } |
| 255 | |
| 256 | void RefreshCache() |
| 257 | { |
| 258 | if(!m_Ctx.IsCaptureLoaded()) |
| 259 | return; |
| 260 | |
| 261 | uint32_t eid = m_Ctx.CurSelectedEvent(); |
| 262 | |
| 263 | m_MessageCounts[eid] = m_Ctx.CurPipelineState().GetShaderMessages().count(); |
| 264 | m_EIDNameCache.remove(eid); |
| 265 | |
| 266 | if(eid != data(m_CurrentEID, ROLE_SELECTED_EID) || eid == 0) |
| 267 | { |
| 268 | QModelIndex oldCurrent = m_CurrentEID; |
| 269 | |
| 270 | m_CurrentEID = GetIndexForEID(eid); |
| 271 | |
| 272 | if(eid == 0 && m_Ctx.CurEvent() != 0) |
| 273 | m_CurrentEID = createIndex(0, 0, TagRoot); |
| 274 | |
| 275 | RefreshIcon(oldCurrent); |
| 276 | RefreshIcon(m_CurrentEID); |
| 277 | } |
| 278 | |
| 279 | if(m_Ctx.GetBookmarks() != m_Bookmarks) |
| 280 | { |
| 281 | rdcarray<QModelIndex> indices; |
| 282 | indices.swap(m_BookmarkIndices); |
| 283 | |
| 284 | m_Bookmarks = m_Ctx.GetBookmarks(); |
| 285 | |
| 286 | for(const EventBookmark &b : m_Bookmarks) |
| 287 | m_BookmarkIndices.push_back(GetIndexForEID(b.eventId)); |
| 288 | |
| 289 | for(QModelIndex idx : indices) |
| 290 | RefreshIcon(idx); |
| 291 | for(QModelIndex idx : m_BookmarkIndices) |
| 292 | RefreshIcon(idx); |
| 293 | } |
| 294 | |
| 295 | if(m_Ctx.ResourceNameCacheID() != m_RenameCacheID) |
| 296 | { |
| 297 | m_View->viewport()->update(); |
| 298 | } |
| 299 | |
| 300 | m_RenameCacheID = m_Ctx.ResourceNameCacheID(); |
| 301 | } |
| 302 | |
| 303 | void SetAnnotationPath(const rdcstr &keyPath) |
| 304 | { |
no test coverage detected