From 8ab459a6980f6921e27d6fba96db948fde9358e1 Mon Sep 17 00:00:00 2001 From: johanengelen Date: Fri, 13 Oct 2006 09:41:44 +0000 Subject: [PATCH] Removed some copy-paste code. --- src/sp-namedview.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp index fe6b805bc..27b19fee6 100644 --- a/src/sp-namedview.cpp +++ b/src/sp-namedview.cpp @@ -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); } } -- 2.30.2