diff --git a/src/draw-context.cpp b/src/draw-context.cpp
index 6263880a4ded0f79151a13b94dc0a826e48c8bac..9390834d133041e3aef00e4f151211b8de40a861 100644 (file)
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
switch (event->type) {
case GDK_KEY_PRESS:
switch (get_group0_keyval (&event->key)) {
- case GDK_Escape:
- sp_desktop_selection(desktop)->clear();
- ret = TRUE;
- break;
- case GDK_Tab: // Tab - cycle selection forward
- if (!(MOD__CTRL_ONLY || (MOD__CTRL && MOD__SHIFT))) {
- sp_selection_item_next();
- ret = TRUE;
- }
- break;
- case GDK_ISO_Left_Tab: // Shift Tab - cycle selection backward
- if (!(MOD__CTRL_ONLY || (MOD__CTRL && MOD__SHIFT))) {
- sp_selection_item_prev();
- ret = TRUE;
- }
- break;
case GDK_Up:
case GDK_Down:
case GDK_KP_Up:
SPCurve *norm = sp_shape_get_curve(SP_SHAPE(item));
sp_curve_transform(norm, sp_item_i2d_affine(dc->white_item));
g_return_if_fail( norm != NULL );
- dc->white_curves = sp_curve_split(norm);
+ dc->white_curves = g_slist_reverse(sp_curve_split(norm));
sp_curve_unref(norm);
/* Anchor list */
for (GSList *l = dc->white_curves; l != NULL; l = l->next) {
SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(dc);
SPDocument *doc = sp_desktop_document(desktop);
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
if ( c && !sp_curve_empty(c) ) {
/* We actually have something to write */
if (dc->white_item) {
repr = SP_OBJECT_REPR(dc->white_item);
} else {
- repr = sp_repr_new("svg:path");
+ repr = xml_doc->createElement("svg:path");
/* Set style */
sp_desktop_apply_style_tool(desktop, repr, tool_name(dc), false);
}
item->updateRepr();
}
- sp_document_done(doc);
+ sp_document_done(doc, SP_IS_PEN_CONTEXT(dc)? SP_VERB_CONTEXT_PEN : SP_VERB_CONTEXT_PENCIL,
+ _("Draw path"));
}
sp_curve_unref(c);