summaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rw-r--r--src/display/canvas-grid.cpp7
-rw-r--r--src/ui/dialog/document-properties.cpp1
2 files changed, 4 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"));
}
/*
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index 4a57c6bfc..33193bbba 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -564,6 +564,7 @@ DocumentProperties::onRemoveGrid()
// delete the grid that corresponds with the selected tab
// when the grid is deleted from SVG, the SPNamedview handler automatically deletes the object, so found_grid becomes an invalid pointer!
found_grid->repr->parent()->removeChild(found_grid->repr);
+ sp_document_done(sp_desktop_document(dt), SP_VERB_DIALOG_NAMEDVIEW, _("Remove grid"));
}
}