From 4005f22ecf8d9813a211841cf3a19106ae7f77f3 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 5 Mar 2018 20:05:20 +0100 Subject: [PATCH] Clear selection only on right mouse click. Add tooltip. --- server/TracyView.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index e6cfb6ea..84cf73f5 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -2739,8 +2739,6 @@ void View::DrawFindZone() ImGui::Checkbox( "Log values", &m_findZone.logVal ); ImGui::SameLine(); ImGui::Checkbox( "Log time", &m_findZone.logTime ); - ImGui::SameLine(); - if( ImGui::Button( "Clear selection" ) ) m_findZone.highlight.active = false; ImGui::Text( "Time range: %s - %s (%s)", TimeToString( tmin ), TimeToString( tmax ), TimeToString( tmax - tmin ) ); @@ -2754,6 +2752,14 @@ void View::DrawFindZone() { ImGui::Text( "Selection range: none" ); } + ImGui::SameLine(); + ImGui::TextDisabled( "(?)" ); + if( ImGui::IsItemHovered() ) + { + ImGui::BeginTooltip(); + ImGui::Text( "Left draw on histogram to select range. Right click to clear selection." ); + ImGui::EndTooltip(); + } const auto dt = double( tmax - tmin );