From 14b469f219b27bbbfe48f54c7300fb4b1e3d4157 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 13 Nov 2021 15:31:48 +0100 Subject: [PATCH] Direct selection of find zone callstack. --- server/TracyView.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index a2555774..613e413e 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -11074,11 +11074,20 @@ void View::DrawFindZone() } ImGui::SameLine(); ImGui::Text( "%s / %s", RealToString( m_findZone.selCs + 1 ), RealToString( gsz ) ); + if( ImGui::IsItemClicked() ) ImGui::OpenPopup( "FindZoneCallstackPopup" ); ImGui::SameLine(); if( ImGui::SmallButton( " " ICON_FA_CARET_RIGHT " " ) ) { m_findZone.selCs = std::min( m_findZone.selCs + 1, gsz - 1 ); } + if( ImGui::BeginPopup( "FindZoneCallstackPopup" ) ) + { + int sel = m_findZone.selCs + 1; + ImGui::SetNextItemWidth( 120 ); + const bool clicked = ImGui::InputInt( "##findZoneCallstack", &sel, 1, 100, ImGuiInputTextFlags_EnterReturnsTrue ); + if( clicked ) m_findZone.selCs = std::min( std::max( sel, 1 ), int( gsz ) ) - 1; + ImGui::EndPopup(); + } ImGui::SameLine(); TextFocused( "Count:", RealToString( group->second.zones.size() ) );