From 3b8ab5715f312fdadf7f9ee3e559221f2cc74a38 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 29 Sep 2019 18:53:58 +0200 Subject: [PATCH] Highlight CPU data timeline from CPU data window. --- server/TracyView.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index ccf8760f..e2f229dd 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -11184,6 +11184,7 @@ void View::DrawCpuDataWindow() } const auto pidtxt = pid.first == 0 ? "Unknown" : RealToString( pid.first, true ); const auto expand = ImGui::TreeNode( pidtxt ); + if( ImGui::IsItemHovered() ) m_drawThreadHighlight = pid.first; const auto tsz = pid.second.tids.size(); if( tsz > 1 ) { @@ -11192,6 +11193,7 @@ void View::DrawCpuDataWindow() } ImGui::NextColumn(); ImGui::TextUnformatted( pid.first == 0 ? "???" : name ); + if( ImGui::IsItemHovered() ) m_drawThreadHighlight = pid.first; ImGui::NextColumn(); sprintf( buf, "%s (%.2f%%)", TimeToString( pid.second.data.runningTime ), double( pid.second.data.runningTime ) * rtimespan * 100 ); ImGui::ProgressBar( double( pid.second.data.runningTime ) * rtimespan, ImVec2( -1, ty ), buf ); @@ -11230,8 +11232,10 @@ void View::DrawCpuDataWindow() const auto& tit = ctd.find( tid ); assert( tit != ctd.end() ); ImGui::TextUnformatted( RealToString( tid, true ) ); + if( ImGui::IsItemHovered() ) m_drawThreadHighlight = tid; ImGui::NextColumn(); ImGui::TextUnformatted( tname ); + if( ImGui::IsItemHovered() ) m_drawThreadHighlight = tid; if( tidMatch ) { ImGui::SameLine();