Remove threads that had group hint changed from thread order list.

This commit is contained in:
Bartosz Taudul 2024-08-03 20:11:35 +02:00
parent bdacfe7c37
commit dbf6274bff
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -709,6 +709,17 @@ bool View::DrawImpl()
m_acb(); m_acb();
} }
auto& threadHints = m_worker.GetPendingThreadHints();
if( !threadHints.empty() )
{
for( auto v : threadHints )
{
auto it = std::find_if( m_threadOrder.begin(), m_threadOrder.end(), [v]( const auto& t ) { return t->id == v; } );
if( it != m_threadOrder.end() ) m_threadOrder.erase( it ); // Will be added in the correct place later, like any newly appearing thread
}
m_worker.ClearPendingThreadHints();
}
const auto& io = ImGui::GetIO(); const auto& io = ImGui::GetIO();
m_wasActive = false; m_wasActive = false;