summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8845bc4)
raw | patch | inline | side by side (parent: 8845bc4)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Thu, 20 Mar 2008 06:41:34 +0000 (06:41 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Thu, 20 Mar 2008 06:41:34 +0000 (06:41 +0000) |
src/draw-context.cpp | patch | blob | history |
diff --git a/src/draw-context.cpp b/src/draw-context.cpp
index 64cfb76f76cf2dd00ea8c435d4702fcf8bd15641..13ba9f82848358ef418b5df40d0ce809fb495e02 100644 (file)
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
dc->white_item = item;
/* Curve list */
/* We keep it in desktop coordinates to eliminate calculation errors */
- SPCurve *norm = sp_shape_get_curve(SP_SHAPE(item));
+ SPCurve *norm = sp_path_get_curve_for_edit (SP_PATH(item));
sp_curve_transform(norm, sp_item_i2d_affine(dc->white_item));
g_return_if_fail( norm != NULL );
dc->white_curves = g_slist_reverse(sp_curve_split(norm));
if ( c && !sp_curve_empty(c) ) {
/* We actually have something to write */
+ bool has_lpe = false;
Inkscape::XML::Node *repr;
if (dc->white_item) {
repr = SP_OBJECT_REPR(dc->white_item);
+ LivePathEffectObject *lpeobj = sp_shape_get_livepatheffectobject(SP_SHAPE(dc->white_item));
+ if (lpeobj)
+ has_lpe = true;
} else {
repr = xml_doc->createElement("svg:path");
/* Set style */
gchar *str = sp_svg_write_path(SP_CURVE_BPATH(c));
g_assert( str != NULL );
- repr->setAttribute("d", str);
+ if (has_lpe)
+ repr->setAttribute("inkscape:original-d", str);
+ else
+ repr->setAttribute("d", str);
g_free(str);
if (!dc->white_item) {
sp_document_done(doc, SP_IS_PEN_CONTEXT(dc)? SP_VERB_CONTEXT_PEN : SP_VERB_CONTEXT_PENCIL,
_("Draw path"));
+
+ // When quickly drawing several subpaths with Shift, the next subpath may be finished and
+ // flushed before the selection_modified signal is fired by the previous change, which
+ // results in the tool losing all of the selected path's curve except that last subpath. To
+ // fix this, we force the selection_modified callback now, to make sure the tool's curve is
+ // in sync immediately.
+ spdc_selection_modified(sp_desktop_selection(desktop), 0, dc);
}
sp_curve_unref(c);