fix: Fix Visual Profiler cursor not appearing when graph is partially filled

(cherry picked from commit 6443c2640cb2ef1fb6add9475743b4b4f34b4d6a)
This commit is contained in:
XpolioN authored and Thaddeus Crews committed 2026-07-25 13:19:51 -05:00
1 parent 69309c0227
commit 2140b03695
1 file changed
+3 -1
+3 -1
View File
@@ -491,7 +491,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<int64_t>(frame_metrics[last_metric].frame_number) - max_frames + 1;
int frame = (cursor_metric_edit->get_value() - first_visible_frame);
if (frame < 0) {
frame = 0;
}