summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aa9cfa6)
raw | patch | inline | side by side (parent: aa9cfa6)
author | JucaBlues <JucaBlues@users.sourceforge.net> | |
Tue, 6 Jan 2009 15:51:51 +0000 (15:51 +0000) | ||
committer | JucaBlues <JucaBlues@users.sourceforge.net> | |
Tue, 6 Jan 2009 15:51:51 +0000 (15:51 +0000) |
src/ui/dialog/svg-fonts-dialog.cpp | patch | blob | history |
index 930d5a0a360bd28a475682fdd1afb6d0a515e121..1a908e3c57a3d237c8fad59d4b7d36d148e78292 100644 (file)
Inkscape::XML::Node* node = (Inkscape::XML::Node*) g_slist_nth_data((GSList *)sel->reprList(), 0);
if (!node || !node->matchAttributeName("d")) return;
if (!node->attribute("d")) return; //TODO: give a message to the user
+ //"This object does not have a path description."
+ //How should we tell it to the user?
Geom::PathVector pathv = sp_svg_read_pathv(node->attribute("d"));
//then we offset it
pathv+=Geom::Point(Geom::Coord(0),Geom::Coord(get_selected_spfont()->horiz_adv_x));
- get_selected_glyph()->repr->setAttribute("d", (char*) sp_svg_write_path (pathv));
+ SPGlyph* glyph = get_selected_glyph();
+ if (!glyph) return; //TODO: give a message: "No glyph selected"
+ glyph->repr->setAttribute("d", (char*) sp_svg_write_path (pathv));
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Set glyph curves"));
update_glyphs();