From: johanengelen Date: Tue, 12 Feb 2008 20:10:21 +0000 (+0000) Subject: Fix initialization of grids. Should finally fix Bug #172778 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ab231f6c4e3a9e2fefe075c6e32f6773af9f2440;p=inkscape.git Fix initialization of grids. Should finally fix Bug #172778 --- diff --git a/src/display/canvas-axonomgrid.cpp b/src/display/canvas-axonomgrid.cpp index ef3a8eae2..f53125731 100644 --- a/src/display/canvas-axonomgrid.cpp +++ b/src/display/canvas-axonomgrid.cpp @@ -212,6 +212,8 @@ CanvasAxonomGrid::CanvasAxonomGrid (SPNamedView * nv, Inkscape::XML::Node * in_r tan_angle[Z] = tan(angle_rad[Z]); snapper = new CanvasAxonomGridSnapper(this, namedview, 0); + + if (repr) readRepr(); } CanvasAxonomGrid::~CanvasAxonomGrid () @@ -441,8 +443,6 @@ _wr.setUpdating (false); attach_all (*table, widget_array, sizeof(widget_array)); - if (repr) readRepr(); - // set widget values _rumg->setUnit (gridunit); diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp index d31eb15c4..245c78eca 100644 --- a/src/display/canvas-grid.cpp +++ b/src/display/canvas-grid.cpp @@ -428,6 +428,8 @@ CanvasXYGrid::CanvasXYGrid (SPNamedView * nv, Inkscape::XML::Node * in_repr, SPD render_dotted = prefs_get_int_attribute ("options.grids.xy", "dotted", 0) == 1; snapper = new CanvasXYGridSnapper(this, namedview, 0); + + if (repr) readRepr(); } CanvasXYGrid::~CanvasXYGrid () @@ -720,8 +722,6 @@ _wr.setUpdating (false); attach_all (*table, widget_array, sizeof(widget_array)); - if (repr) readRepr(); - // set widget values _rumg->setUnit (gridunit);