Observe thread grouping hint when a new thread appears.

This commit is contained in:
Bartosz Taudul 2024-08-03 20:18:40 +02:00
parent 1390c8c9e3
commit a1064a3d26
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -368,7 +368,8 @@ void View::DrawTimeline()
m_threadOrder.reserve( threadData.size() );
for( size_t i=m_threadOrder.size(); i<threadData.size(); i++ )
{
m_threadOrder.push_back( threadData[i] );
auto it = std::upper_bound( m_threadOrder.begin(), m_threadOrder.end(), threadData[i]->groupHint, []( const auto& lhs, const auto& rhs ) { return lhs < rhs->groupHint; } );
m_threadOrder.insert( it, threadData[i] );
}
}
for( const auto& v : m_threadOrder )