diff --git a/server/TracyView.cpp b/server/TracyView.cpp index e0273f16..a2555774 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -16006,11 +16006,20 @@ void View::DrawSampleParents() } ImGui::SameLine(); ImGui::Text( "%s / %s", RealToString( m_sampleParents.sel + 1 ), RealToString( stats.parents.size() ) ); + if( ImGui::IsItemClicked() ) ImGui::OpenPopup( "EntryCallStackPopup" ); ImGui::SameLine(); if( ImGui::SmallButton( " " ICON_FA_CARET_RIGHT " " ) ) { m_sampleParents.sel = std::min( m_sampleParents.sel + 1, stats.parents.size() - 1 ); } + if( ImGui::BeginPopup( "EntryCallStackPopup" ) ) + { + int sel = m_sampleParents.sel + 1; + ImGui::SetNextItemWidth( 120 ); + const bool clicked = ImGui::InputInt( "##entryCallStack", &sel, 1, 100, ImGuiInputTextFlags_EnterReturnsTrue ); + if( clicked ) m_sampleParents.sel = std::min( std::max( sel, 1 ), int( stats.parents.size() ) ) - 1; + ImGui::EndPopup(); + } Vector data; data.reserve( stats.parents.size() ); for( auto it = stats.parents.begin(); it != stats.parents.end(); ++it )