diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2011-01-08 12:11:08 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2011-01-08 12:11:08 +0100 |
commit | 909a0352cc4f89cb7493e78715ae089072eaaee1 (patch) | |
tree | 65a132f8f974c6ba8223900c627b9bd671f82352 /src | |
parent | edd64aa1323740eb4047836bfed88266d622fa79 (diff) | |
download | logdiag-909a0352cc4f89cb7493e78715ae089072eaaee1.tar.gz logdiag-909a0352cc4f89cb7493e78715ae089072eaaee1.tar.xz logdiag-909a0352cc4f89cb7493e78715ae089072eaaee1.zip |
Don't draw the grid when it would be too narrow.
This prevents eating all the memory.
Diffstat (limited to 'src')
-rw-r--r-- | src/ld-canvas.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ld-canvas.c b/src/ld-canvas.c index 8d04b59..b008fb8 100644 --- a/src/ld-canvas.c +++ b/src/ld-canvas.c @@ -1075,6 +1075,9 @@ draw_grid (GtkWidget *widget, DrawData *data) gdouble x_init, y_init; gdouble x, y; + if (data->scale < 2) + return; + ld_canvas_color_apply (COLOR_GET (data->self, COLOR_GRID), data->cr); cairo_set_line_width (data->cr, 1); cairo_set_line_cap (data->cr, CAIRO_LINE_CAP_ROUND); |