From 0ce3b05d6448c5cf2cb074343a1ddbb82acd94a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Gr=C3=A9goire?= Date: Wed, 7 May 2025 15:37:56 +0200 Subject: [PATCH] Fix issues with timeline highlight code when `IsMouseClickReleased` is called `HandleTimelineMouse` did the following - `m_highlight.active = true` when clicked - update range while dragging - `m_highlight.active = false` when not dragging This causes issues when `IsMouseClickReleased` is called somewhere else as - `mousePotentialClickRelease` is set to true on click - At beginning of frame, `mouseDragging` is set to `false` as long as `mousePotentialClickRelease` is `true` and mouse delta is under the drag threshold - This means that if the mouse didn't move enough in the duration of a frame, highlight would immediately stop, even though we were still holding the mouse button down Instead, it now only stops highlighting once the mouse is no longer down (ie: has been "released", cursor having moved or not) --- profiler/src/profiler/TracyView_CpuData.cpp | 2 +- profiler/src/profiler/TracyView_Timeline.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/profiler/src/profiler/TracyView_CpuData.cpp b/profiler/src/profiler/TracyView_CpuData.cpp index ec106b45..b9a9ed8b 100644 --- a/profiler/src/profiler/TracyView_CpuData.cpp +++ b/profiler/src/profiler/TracyView_CpuData.cpp @@ -444,7 +444,7 @@ bool View::DrawCpuData( const TimelineContext& ctx, const std::vector