summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5ab9f56)
raw | patch | inline | side by side (parent: 5ab9f56)
author | pjrm <pjrm@users.sourceforge.net> | |
Thu, 17 May 2007 13:05:12 +0000 (13:05 +0000) | ||
committer | pjrm <pjrm@users.sourceforge.net> | |
Thu, 17 May 2007 13:05:12 +0000 (13:05 +0000) |
src/display/canvas-grid.cpp | patch | blob | history | |
src/ui/dialog/document-properties.cpp | patch | blob | history |
index 30c858dcc6fe1219d88b9a1e243ca936a56722de..8c626355df6bc656de3fa8eb0413237f637b5895 100644 (file)
// 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"));
}
/*
index 4a57c6bfc5013b449ce4330138ac6957bedc333e..33193bbba24301cd9216643f1dab8884a3a1849f 100644 (file)
// 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"));
}
}