From d0d5528e993aed1ce439d34a2c5d61613427b2d8 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 14 Apr 2018 15:21:22 +0200 Subject: [PATCH] Disable histogram highlight using right mouse button. --- server/TracyView.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 46c13a2f..b2fd1d5b 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -3423,11 +3423,6 @@ void View::DrawFindZone() ImGui::Separator(); ImGui::Text( "Found zones:" ); ImGui::SameLine(); - if( ImGui::SmallButton( "Unselect" ) ) - { - m_findZone.selThread = m_findZone.Unselected; - } - ImGui::SameLine(); if( m_findZone.showThreads ) { if( ImGui::SmallButton( "Group by user text" ) ) @@ -3461,6 +3456,14 @@ void View::DrawFindZone() m_findZone.sortByCounts = true; } } + ImGui::SameLine(); + ImGui::TextDisabled( "(?)" ); + if( ImGui::IsItemHovered() ) + { + ImGui::BeginTooltip(); + ImGui::Text( "Left click to highlight entry. Right click to clear selection." ); + ImGui::EndTooltip(); + } auto& zones = m_worker.GetZonesForSourceLocation( m_findZone.match[m_findZone.selMatch] ).zones; auto sz = zones.size(); @@ -3587,6 +3590,10 @@ void View::DrawFindZone() } } ImGui::EndChild(); + if( ImGui::IsItemHovered() && ImGui::IsMouseClicked( 1 ) ) + { + m_findZone.selThread = m_findZone.Unselected; + } } #endif