Don't draw height that's <0
This commit is contained in:
parent
0075b07aac
commit
663b34e4e0
|
@ -367,8 +367,10 @@ static void draw_bar(cairo_t *ctx, double bar_offset, double screen_x, double sc
|
||||||
|
|
||||||
for (int i = 0; i < bar_count; ++i) {
|
for (int i = 0; i < bar_count; ++i) {
|
||||||
double bar_height = bar_heights[i];
|
double bar_height = bar_heights[i];
|
||||||
|
if (bar_height > 0) {
|
||||||
draw_single_bar(ctx, screen_pos + i * bar_width, bar_offset, bar_width, bar_height);
|
draw_single_bar(ctx, screen_pos + i * bar_width, bar_offset, bar_width, bar_height);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < bar_count; ++i) {
|
for (int i = 0; i < bar_count; ++i) {
|
||||||
if (bar_heights[i] > 0) {
|
if (bar_heights[i] > 0) {
|
||||||
|
|
Loading…
Reference in New Issue