mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-23 06:44:35 +00:00
Use ordered threads vector in options.
This commit is contained in:
parent
e957590350
commit
a633c50991
@ -5603,14 +5603,14 @@ void View::DrawOptions()
|
|||||||
auto expand = ImGui::TreeNode( "Visible threads:" );
|
auto expand = ImGui::TreeNode( "Visible threads:" );
|
||||||
#endif
|
#endif
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::TextDisabled( "(%zu)", m_worker.GetThreadData().size() );
|
ImGui::TextDisabled( "(%zu)", m_threadOrder.size() );
|
||||||
if( expand )
|
if( expand )
|
||||||
{
|
{
|
||||||
auto& crash = m_worker.GetCrashEvent();
|
auto& crash = m_worker.GetCrashEvent();
|
||||||
|
|
||||||
if( ImGui::SmallButton( "Select all" ) )
|
if( ImGui::SmallButton( "Select all" ) )
|
||||||
{
|
{
|
||||||
for( const auto& t : m_worker.GetThreadData() )
|
for( const auto& t : m_threadOrder )
|
||||||
{
|
{
|
||||||
Vis( t ).visible = true;
|
Vis( t ).visible = true;
|
||||||
}
|
}
|
||||||
@ -5618,14 +5618,14 @@ void View::DrawOptions()
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if( ImGui::SmallButton( "Unselect all" ) )
|
if( ImGui::SmallButton( "Unselect all" ) )
|
||||||
{
|
{
|
||||||
for( const auto& t : m_worker.GetThreadData() )
|
for( const auto& t : m_threadOrder )
|
||||||
{
|
{
|
||||||
Vis( t ).visible = false;
|
Vis( t ).visible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
for( const auto& t : m_worker.GetThreadData() )
|
for( const auto& t : m_threadOrder )
|
||||||
{
|
{
|
||||||
ImGui::PushID( idx++ );
|
ImGui::PushID( idx++ );
|
||||||
ImGui::Checkbox( m_worker.GetThreadString( t->id ), &Vis( t ).visible );
|
ImGui::Checkbox( m_worker.GetThreadString( t->id ), &Vis( t ).visible );
|
||||||
|
Loading…
Reference in New Issue
Block a user