Code

Removed some copy-paste code.
authorjohanengelen <johanengelen@users.sourceforge.net>
Fri, 13 Oct 2006 09:41:44 +0000 (09:41 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Fri, 13 Oct 2006 09:41:44 +0000 (09:41 +0000)
src/sp-namedview.cpp

index fe6b805bc9b4558dd2e47f5d4b144258a08f43ff..27b19fee605367c827c17b2129c1ffc2044afe89 100644 (file)
@@ -848,28 +848,24 @@ static void sp_namedview_setup_grid_item(SPNamedView *nv, SPCanvasItem *item)
         sp_canvas_item_hide(item);
     }
     
+    sp_canvas_item_set((GtkObject *) item,
+                       "color", nv->gridcolor,
+                       "originx", nv->gridorigin[NR::X],
+                       "originy", nv->gridorigin[NR::Y],
+                       "spacingy", nv->gridspacing[NR::Y],
+                       "empcolor", nv->gridempcolor,
+                       "empspacing", nv->gridempspacing,
+                       NULL);
     if (!btype){
         // CGRID
         sp_canvas_item_set((GtkObject *) item,
-                           "color", nv->gridcolor,
-                           "originx", nv->gridorigin[NR::X],
-                           "originy", nv->gridorigin[NR::Y],
                            "spacingx", nv->gridspacing[NR::X],
-                           "spacingy", nv->gridspacing[NR::Y],
-                           "empcolor", nv->gridempcolor,
-                           "empspacing", nv->gridempspacing,
                            NULL);
     } else {
         // CAXONOMGRID
         sp_canvas_item_set((GtkObject *) item,
-                           "color", nv->gridcolor,
-                           "originx", nv->gridorigin[NR::X],
-                           "originy", nv->gridorigin[NR::Y],
-                           "spacingy", nv->gridspacing[NR::Y],
                            "anglex", nv->gridangle[0],
                            "anglez", nv->gridangle[1],
-                           "empcolor", nv->gridempcolor,
-                           "empspacing", nv->gridempspacing,
                            NULL);
     }
 }