summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ba387fe)
raw | patch | inline | side by side (parent: ba387fe)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Thu, 26 Mar 2009 23:02:22 +0000 (23:02 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Thu, 26 Mar 2009 23:02:22 +0000 (23:02 +0000) |
src/selection-chemistry.cpp | patch | blob | history | |
src/sp-path.cpp | patch | blob | history |
index f393f73f959081b5fa65669790bd35756f9e4bba..891e958a535c181f0dda5c48a86f7a7d0592e28e 100644 (file)
void sp_selection_remove_livepatheffect_impl(SPItem *item)
{
- if ( item && SP_IS_LPE_ITEM(item) ) {
+ if ( item && SP_IS_LPE_ITEM(item) &&
+ sp_lpe_item_has_path_effect(SP_LPE_ITEM(item))) {
sp_lpe_item_remove_all_path_effects(SP_LPE_ITEM(item), false);
}
}
diff --git a/src/sp-path.cpp b/src/sp-path.cpp
index 51c3746c89b3dc4f6f4cfb4f76a8462b7943e5aa..760f61e27f56550a7fb7ffba02909264950240e8 100644 (file)
--- a/src/sp-path.cpp
+++ b/src/sp-path.cpp
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);
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)*/
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 );
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;