Code

Bug fix in set_gridtype
authorjohanengelen <johanengelen@users.sourceforge.net>
Thu, 26 Oct 2006 21:12:38 +0000 (21:12 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Thu, 26 Oct 2006 21:12:38 +0000 (21:12 +0000)
src/sp-namedview.cpp
src/sp-namedview.h

index da95a8ab70449d9714719d334d15a3226ad46ee9..6ab3c5235442f3c231cbb5006efbcf41592bb780 100644 (file)
@@ -823,12 +823,12 @@ void sp_namedview_toggle_grid(SPDocument *doc, Inkscape::XML::Node *repr)
     sp_document_set_undo_sensitive(doc, saved);
 }
 
-void sp_namedview_set_gridtype(bool type, SPDocument *doc, Inkscape::XML::Node *repr)
+void sp_namedview_set_gridtype(unsigned int type, SPDocument *doc, Inkscape::XML::Node *repr)
 {
     bool saved = sp_document_get_undo_sensitive(doc);
     sp_document_set_undo_sensitive(doc, false);
 
-    sp_repr_set_boolean(repr, "showgrid", type);
+    sp_repr_set_int(repr, "gridtype", (gint)type);
 
     doc->rroot->setAttribute("sodipodi:modified", "true");
     sp_document_set_undo_sensitive(doc, saved);
index 6625fd027f8f50d1791e71ff3349e44ae5f6cc2d..e16f7a0beaac793b80a285eacfd1f562b68a4cf1 100644 (file)
@@ -109,7 +109,7 @@ void sp_namedview_document_from_window(SPDesktop *desktop);
 
 void sp_namedview_toggle_guides(SPDocument *doc, Inkscape::XML::Node *repr);
 void sp_namedview_toggle_grid(SPDocument *doc, Inkscape::XML::Node *repr);
-void sp_namedview_set_gridtype(bool type, SPDocument *doc, Inkscape::XML::Node *repr);
+void sp_namedview_set_gridtype(unsigned int type, SPDocument *doc, Inkscape::XML::Node *repr);
 
 #endif /* !INKSCAPE_SP_NAMEDVIEW_H */