Only prompt to highlight thread if cpu usage graph is enabled

This commit is contained in:
Clément Grégoire
2025-04-09 17:20:18 +02:00
parent 296a3bb590
commit 413055f8d5
2 changed files with 6 additions and 2 deletions

View File

@@ -277,7 +277,7 @@ void TimelineItemThread::DrawOverlay( const ImVec2& ul, const ImVec2& dr )
void TimelineItemThread::DrawExtraPopupItems()
{
if( ImGui::MenuItem( ICON_FA_TIMELINE " Select in CPU timeline" ) )
if( m_view.GetViewData().drawCpuUsageGraph && ImGui::MenuItem( ICON_FA_TIMELINE " Select in CPU timeline" ) )
{
m_view.HighlightThread( m_thread->id, true );
}

View File

@@ -242,7 +242,11 @@ void View::DrawTimeline()
m_msgHighlight.Decay( nullptr );
m_zoneSrcLocHighlight.Decay( 0 );
m_lockHoverHighlight.Decay( InvalidId );
if ( !m_freezeCpuDataSelectedThread )
if( !m_vd.drawCpuUsageGraph )
{
m_freezeCpuDataSelectedThread = 0;
}
if( !m_freezeCpuDataSelectedThread )
{
m_drawThreadMigrations.Decay( 0 );
m_drawThreadHighlight.Decay( 0 );