1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Fix thread name clashes in ImGui.

This commit is contained in:
Bartosz Taudul 2018-03-04 18:52:32 +01:00
parent fa46445537
commit 5c1aec723d

View File

@ -2625,9 +2625,12 @@ void View::DrawOptions()
ImGui::Separator();
ImGui::Text( "Visible threads:" );
ImGui::Indent( tw );
int idx = 0;
for( const auto& t : m_worker.GetThreadData() )
{
ImGui::PushID( idx++ );
ImGui::Checkbox( m_worker.GetThreadString( t->id ), &Visible( t ) );
ImGui::PopID();
}
ImGui::Unindent( tw );
ImGui::End();
@ -2939,9 +2942,12 @@ void View::DrawFindZone()
ImGui::Separator();
ImGui::Text( "Found zones:" );
int idx = 0;
for( auto& v : m_findZone.result )
{
ImGui::PushID( idx++ );
const bool expand = ImGui::TreeNode( m_worker.GetThreadString( v->id ) );
ImGui::PopID();
ImGui::SameLine();
ImGui::TextColored( ImVec4( 0.5f, 0.5f, 0.5f, 1.0f ), "(%s)", RealToString( v->timeline.size(), true ) );