app: don't draw the grid if it covers the image entirely
Regardless of the elaborate discussion in bug #599267, as soon as the grid starts covering the image completely (when the is no more spacing between grid lines), it is entirely useless, so skip drawing it.
This commit is contained in:
@ -206,6 +206,13 @@ gimp_canvas_grid_draw (GimpCanvasItem *item,
|
||||
|
||||
g_return_if_fail (private->grid->xspacing > 0 && private->grid->yspacing > 0);
|
||||
|
||||
/* skip grid drawing when the space between grid lines starts
|
||||
* disappearing, see bug #599267.
|
||||
*/
|
||||
if (private->grid->xspacing * shell->scale_x < 2.0 ||
|
||||
private->grid->yspacing * shell->scale_y < 2.0)
|
||||
return;
|
||||
|
||||
cairo_clip_extents (cr, &dx1, &dy1, &dx2, &dy2);
|
||||
|
||||
x1 = floor (dx1);
|
||||
|
||||
Reference in New Issue
Block a user