Merge pull request #118294 from XpolioN2005/fix/vp-graph-cursor
Fix Visual Profiler cursor not appearing when graph is partially filled
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user