diff options
| author | bulia byak <buliabyak@gmail.com> | 2009-03-26 23:02:22 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2009-03-26 23:02:22 +0000 |
| commit | ad12fe58edef2a31780e89c65ea0675253862711 (patch) | |
| tree | 50149138494ab926a0da0bfd53e8a51a8487581d /src/sp-path.cpp | |
| parent | sp_lpe_item_has_path_effect now returns false if one of the effects in the st... (diff) | |
| download | inkscape-ad12fe58edef2a31780e89c65ea0675253862711.tar.gz inkscape-ad12fe58edef2a31780e89c65ea0675253862711.zip | |
do not transform, display, reverse, node-edit, or remove LPE if LPE stack is disabled by an invalid or unsupported effect in it
(bzr r7567)
Diffstat (limited to 'src/sp-path.cpp')
| -rw-r--r-- | src/sp-path.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/sp-path.cpp b/src/sp-path.cpp index 51c3746c8..760f61e27 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -357,8 +357,9 @@ sp_path_set_transform(SPItem *item, Geom::Matrix const &xform) return Geom::identity(); } - // Transform the original-d path or the (ordinary) path - if (path->original_curve) { + // Transform the original-d path if this is a valid LPE item, other else the (ordinary) path + if (path->original_curve && SP_IS_LPE_ITEM(item) && + sp_lpe_item_has_path_effect(SP_LPE_ITEM(item))) { path->original_curve->transform(xform); } else { shape->curve->transform(xform); @@ -390,7 +391,7 @@ sp_path_update_patheffect(SPLPEItem *lpeitem, bool write) SPPath * const path = (SPPath *) lpeitem; Inkscape::XML::Node *repr = SP_OBJECT_REPR(shape); - if (path->original_curve) { + if (path->original_curve && sp_lpe_item_has_path_effect(lpeitem)) { SPCurve *curve = path->original_curve->copy(); /* if a path does not have an lpeitem applied, then reset the curve to the original_curve. * This is very important for LPEs to work properly! (the bbox might be recalculated depending on the curve in shape)*/ @@ -467,7 +468,8 @@ sp_path_get_original_curve (SPPath *path) SPCurve* sp_path_get_curve_for_edit (SPPath *path) { - if (path->original_curve) { + if (path->original_curve && SP_IS_LPE_ITEM(path) && + sp_lpe_item_has_path_effect(SP_LPE_ITEM(path))) { return sp_path_get_original_curve(path); } else { return sp_shape_get_curve( (SPShape *) path ); @@ -481,7 +483,8 @@ sp_path_get_curve_for_edit (SPPath *path) const SPCurve* sp_path_get_curve_reference (SPPath *path) { - if (path->original_curve) { + if (path->original_curve && SP_IS_LPE_ITEM(path) && + sp_lpe_item_has_path_effect(SP_LPE_ITEM(path))) { return path->original_curve; } else { return path->curve; |
