From edb98dfe4721a50b73755978993c0556ba7d170b Mon Sep 17 00:00:00 2001 From: Peter Moulder Date: Thu, 17 May 2007 13:05:12 +0000 Subject: Fix a couple of unannotated transactions causing g_warning from finish_incomplete_transaction. (Thanks to johanengelen for help with this.) (bzr r3019) --- src/display/canvas-grid.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/display/canvas-grid.cpp') diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp index 30c858dcc..8c626355d 100644 --- a/src/display/canvas-grid.cpp +++ b/src/display/canvas-grid.cpp @@ -223,16 +223,15 @@ CanvasGrid::writeNewGridToRepr(Inkscape::XML::Node * repr, GridType gridtype) // first create the child xml node, then hook it to repr. This order is important, to not set off listeners to repr before the new node is complete. - Inkscape::XML::Document *xml_doc = sp_document_repr_doc(sp_desktop_document(SP_ACTIVE_DESKTOP)); + SPDocument *current_document = sp_desktop_document(SP_ACTIVE_DESKTOP); + Inkscape::XML::Document *xml_doc = sp_document_repr_doc(current_document); Inkscape::XML::Node *newnode; newnode = xml_doc->createElement("inkscape:grid"); newnode->setAttribute("type", getSVGName(gridtype)); repr->appendChild(newnode); - // FIXME: add this to history? -// sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR, -// _("Create new element node")); + sp_document_done(current_document, SP_VERB_DIALOG_NAMEDVIEW, _("Create new grid")); } /* -- cgit v1.2.3