mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Take group hint into account when sorting threads.
This commit is contained in:
parent
dbf6274bff
commit
1390c8c9e3
@ -608,7 +608,10 @@ void View::DrawOptions()
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if( ImGui::SmallButton( "Sort" ) )
|
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; } );
|
std::sort( m_threadOrder.begin(), m_threadOrder.end(), [this] ( const auto& lhs, const auto& rhs ) {
|
||||||
|
if( lhs->groupHint != rhs->groupHint ) return lhs->groupHint < rhs->groupHint;
|
||||||
|
return strcmp( m_worker.GetThreadName( lhs->id ), m_worker.GetThreadName( rhs->id ) ) < 0;
|
||||||
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto wposx = ImGui::GetCursorScreenPos().x;
|
const auto wposx = ImGui::GetCursorScreenPos().x;
|
||||||
|
Loading…
Reference in New Issue
Block a user