Fix #90389: No labels in scrubbing area with small FPS
Maximum distance of lines in screen space is limited. This limit seems reasonable for FPS higher than 1, but UI allows to set 0.01 FPS with soft. even lower values are possible. This patch allows for normal operation within soft limits and labels are still visible and quite usable within hard limits. Pull Request: blender/blender#104849
This commit is contained in:
@@ -102,17 +102,16 @@ static float view2d_major_step_x__time(const View2D *v2d, const Scene *scene)
|
||||
for (int step = 1; step < fps; step *= 2) {
|
||||
possible_distances.append(step);
|
||||
}
|
||||
possible_distances.append(fps);
|
||||
possible_distances.append(2 * fps);
|
||||
possible_distances.append(5 * fps);
|
||||
possible_distances.append(10 * fps);
|
||||
possible_distances.append(30 * fps);
|
||||
possible_distances.append(60 * fps);
|
||||
possible_distances.append(2 * 60 * fps);
|
||||
possible_distances.append(5 * 60 * fps);
|
||||
possible_distances.append(10 * 60 * fps);
|
||||
possible_distances.append(30 * 60 * fps);
|
||||
possible_distances.append(60 * 60 * fps);
|
||||
|
||||
for (int i = 0; i <= 5; i++) {
|
||||
uint fac = pow(60, i);
|
||||
possible_distances.append(fac * fps);
|
||||
possible_distances.append(fac * 2 * fps);
|
||||
possible_distances.append(fac * 5 * fps);
|
||||
possible_distances.append(fac * 10 * fps);
|
||||
possible_distances.append(fac * 30 * fps);
|
||||
possible_distances.append(fac * 60 * fps);
|
||||
}
|
||||
|
||||
float distance = select_major_distance(possible_distances.data(),
|
||||
possible_distances.size(),
|
||||
|
||||
Reference in New Issue
Block a user