From f361d7484d04b322f2396fd3130096f1ec7cc504 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 5 Mar 2018 20:30:21 +0100 Subject: [PATCH] Put selection information next to each other. --- server/TracyView.cpp | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 81633836..99c8e3b9 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -2752,25 +2752,6 @@ void View::DrawFindZone() ImGui::Text( "Time range: %s - %s (%s)", TimeToString( tmin ), TimeToString( tmax ), TimeToString( tmax - tmin ) ); - if( m_findZone.highlight.active ) - { - const auto s = std::min( m_findZone.highlight.start, m_findZone.highlight.end ); - const auto e = std::max( m_findZone.highlight.start, m_findZone.highlight.end ); - ImGui::Text( "Selection range: %s - %s (%s)", TimeToString( s ), TimeToString( e ), TimeToString( e - s ) ); - } - else - { - 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 ); if( dt > 0 ) @@ -2884,6 +2865,24 @@ void View::DrawFindZone() ImGui::SameLine(); ImGui::Text( "Max counts: %s", m_findZone.cumulateTime ? TimeToString( maxVal ) : RealToString( maxVal, true ) ); + if( m_findZone.highlight.active ) + { + const auto s = std::min( m_findZone.highlight.start, m_findZone.highlight.end ); + const auto e = std::max( m_findZone.highlight.start, m_findZone.highlight.end ); + ImGui::Text( "Selection range: %s - %s (%s)", TimeToString( s ), TimeToString( e ), TimeToString( e - s ) ); + } + else + { + 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(); + } if( m_findZone.highlight.active ) { ImGui::Text( "Selection time: %s", TimeToString( selectionTime ) );