From 6de8e6987f2ad3b33ec488793971544658924d2c Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 14 Oct 2019 19:04:37 +0200 Subject: [PATCH] Sort annotations. --- server/TracyView.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 65c9e161..168ad5f8 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1433,6 +1433,7 @@ void View::HandleZoneViewMouse( int64_t timespan, const ImVec2& wpos, float w, d ann->color = 0x888888; m_selectedAnnotation = ann.get(); m_annotations.emplace_back( std::move( ann ) ); + pdqsort_branchless( m_annotations.begin(), m_annotations.end(), []( const auto& lhs, const auto& rhs ) { return lhs->start < rhs->start; } ); } m_highlight.active = false; }