From: gouldtj Date: Sun, 6 Jan 2008 21:51:15 +0000 (+0000) Subject: r17530@shi: ted | 2008-01-06 13:50:53 -0800 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6d6f6dbc3393f100c375d59bb07976f4cf242e7f;p=inkscape.git r17530@shi: ted | 2008-01-06 13:50:53 -0800 Swapping arround some logic and setting up the grid lines so that major ones are drawn when zoomed out correctly. This is lp:167422 --- diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp index 20856709c..0edcbd0ab 100644 --- a/src/display/canvas-grid.cpp +++ b/src/display/canvas-grid.cpp @@ -839,10 +839,10 @@ CanvasXYGrid::Render (SPCanvasBuf *buf) for (y = syg, ylinenum = ylinestart; y < buf->rect.y1; y += sw[NR::Y], ylinenum++) { gint const y0 = (gint) Inkscape::round(y); - if (!scaled[NR::Y] && (ylinenum % empspacing) == 0) { - grid_hline (buf, y0, buf->rect.x0, buf->rect.x1 - 1, empcolor); - } else { + if (!scaled[NR::Y] && (ylinenum % empspacing) != 0) { grid_hline (buf, y0, buf->rect.x0, buf->rect.x1 - 1, color); + } else { + grid_hline (buf, y0, buf->rect.x0, buf->rect.x1 - 1, empcolor); } } @@ -850,10 +850,10 @@ CanvasXYGrid::Render (SPCanvasBuf *buf) gdouble x; for (x = sxg, xlinenum = xlinestart; x < buf->rect.x1; x += sw[NR::X], xlinenum++) { gint const ix = (gint) Inkscape::round(x); - if (!scaled[NR::X] && (xlinenum % empspacing) == 0) { - grid_vline (buf, ix, buf->rect.y0, buf->rect.y1, empcolor); - } else { + if (!scaled[NR::X] && (xlinenum % empspacing) != 0) { grid_vline (buf, ix, buf->rect.y0, buf->rect.y1, color); + } else { + grid_vline (buf, ix, buf->rect.y0, buf->rect.y1, empcolor); } } } else {