summaryrefslogtreecommitdiffstats
path: root/src/display/canvas-grid.cpp
diff options
context:
space:
mode:
authorPeter Moulder <peter.moulder@monash.edu>2007-05-17 13:05:12 +0000
committerpjrm <pjrm@users.sourceforge.net>2007-05-17 13:05:12 +0000
commitedb98dfe4721a50b73755978993c0556ba7d170b (patch)
tree1308df01d3d159e6adda5d6a5ad72f9409d950a3 /src/display/canvas-grid.cpp
parentImplement object-snapping for clones (see bug #1511260) (diff)
downloadinkscape-edb98dfe4721a50b73755978993c0556ba7d170b.tar.gz
inkscape-edb98dfe4721a50b73755978993c0556ba7d170b.zip
Fix a couple of unannotated transactions causing g_warning from finish_incomplete_transaction. (Thanks to johanengelen for help with this.)
(bzr r3019)
Diffstat (limited to 'src/display/canvas-grid.cpp')
-rw-r--r--src/display/canvas-grid.cpp7
1 files changed, 3 insertions, 4 deletions
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"));
}
/*