Code

Fix initialization of grids. Should finally fix Bug #172778
authorjohanengelen <johanengelen@users.sourceforge.net>
Tue, 12 Feb 2008 20:10:21 +0000 (20:10 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Tue, 12 Feb 2008 20:10:21 +0000 (20:10 +0000)
src/display/canvas-axonomgrid.cpp
src/display/canvas-grid.cpp

index ef3a8eae28818c93b572d45c991ff1a242773e0b..f531257310cd62c82695648aec4ad25dc3a61bcf 100644 (file)
@@ -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);
 
index d31eb15c4a60999831fa6e6cbd0b2d2a0942277d..245c78ecae7c417299341d5a4d44cd93b4fff138 100644 (file)
@@ -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);