From 6443c2640cb2ef1fb6add9475743b4b4f34b4d6a Mon Sep 17 00:00:00 2001 From: XpolioN <146839835+XpolioN2005@users.noreply.github.com> Date: Wed, 8 Apr 2026 09:02:40 +0530 Subject: [PATCH] fix: Fix Visual Profiler cursor not appearing when graph is partially filled --- editor/debugger/editor_visual_profiler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp index 80a525c40d..58520af594 100644 --- a/editor/debugger/editor_visual_profiler.cpp +++ b/editor/debugger/editor_visual_profiler.cpp @@ -473,7 +473,9 @@ void EditorVisualProfiler::_graph_tex_draw() { if (seeking) { int max_frames = frame_metrics.size(); - int frame = cursor_metric_edit->get_value() - (frame_metrics[last_metric].frame_number - max_frames + 1); + + int64_t first_visible_frame = static_cast(frame_metrics[last_metric].frame_number) - max_frames + 1; + int frame = (cursor_metric_edit->get_value() - first_visible_frame); if (frame < 0) { frame = 0; }