diff --git a/profiler/src/profiler/TracyView_Options.cpp b/profiler/src/profiler/TracyView_Options.cpp index 4f577062..0f56056c 100644 --- a/profiler/src/profiler/TracyView_Options.cpp +++ b/profiler/src/profiler/TracyView_Options.cpp @@ -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();