Add thread sorting.

This commit is contained in:
Bartosz Taudul 2024-05-06 20:18:13 +02:00
parent d6b059f0cc
commit 839cf6ef91
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -599,6 +599,11 @@ void View::DrawOptions()
m_tc.GetItem( t ).SetVisible( false );
}
}
ImGui::SameLine();
if( ImGui::SmallButton( "Sort" ) )
{
std::sort( m_threadOrder.begin(), m_threadOrder.end(), [this] ( const auto& lhs, const auto& rhs ) { return strcmp( m_worker.GetThreadName( lhs->id ), m_worker.GetThreadName( rhs->id ) ) < 0; } );
}
const auto wposx = ImGui::GetCursorScreenPos().x;
m_threadDnd.clear();