diff options
Diffstat (limited to 'src/live_effects')
| -rw-r--r-- | src/live_effects/effect.cpp | 6 | ||||
| -rw-r--r-- | src/live_effects/effect.h | 3 | ||||
| -rw-r--r-- | src/live_effects/lpe-mirror_reflect.h | 2 | ||||
| -rw-r--r-- | src/live_effects/lpe-tangent_to_curve.h | 2 |
4 files changed, 10 insertions, 3 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 0497d0e37..9476f0377 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -408,12 +408,16 @@ Effect::addHelperPaths(SPLPEItem *lpeitem, SPDesktop *desktop) { g_return_if_fail(SP_IS_PATH(lpeitem)); - if (show_orig_path) { + if (providesKnotholder() && showOrigPath()) { + // TODO: we assume that if the LPE provides its own knotholder, there is no nodepath so we + // must create the helper curve for the original path manually; when we allow nodepaths and + // knotholders alongside each other, this needs to be rethought! SPCanvasItem *canvasitem = sp_nodepath_generate_helperpath(desktop, SP_PATH(lpeitem)); // TODO: Make sure the tempitem doesn't get destroyed when the mouse leaves the item Inkscape::Display::TemporaryItem* tmpitem = desktop->add_temporary_canvasitem (canvasitem, 0); lpeitem->lpe_helperpaths.push_back(tmpitem); } + addHelperPathsImpl(lpeitem, desktop); } diff --git a/src/live_effects/effect.h b/src/live_effects/effect.h index 32917f8c8..9bcbf51ab 100644 --- a/src/live_effects/effect.h +++ b/src/live_effects/effect.h @@ -116,6 +116,8 @@ public: virtual void transform_multiply(Geom::Matrix const& postmul, bool set); + // TODO: providesKnotholder() is currently used as an indicator of whether a nodepath is + // created for an item or not. When we allow both at the same time, this needs rethinking! bool providesKnotholder() { return (kh_entity_vector.size() > 0); } virtual LPEPathFlashType pathFlashType() { return DEFAULT; } void addHandles(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item); @@ -124,6 +126,7 @@ public: inline bool providesOwnFlashPaths() { return provides_own_flash_paths || show_orig_path; } + inline bool showOrigPath() { return show_orig_path; } Glib::ustring getName(); Inkscape::XML::Node * getRepr(); diff --git a/src/live_effects/lpe-mirror_reflect.h b/src/live_effects/lpe-mirror_reflect.h index a19aafb89..b4f7029a0 100644 --- a/src/live_effects/lpe-mirror_reflect.h +++ b/src/live_effects/lpe-mirror_reflect.h @@ -31,7 +31,7 @@ public: virtual void acceptParamPath (SPPath *param_path); virtual int acceptsNumParams() { return 2; } - virtual LPEPathFlashType pathFlashType() { return PERMANENT_FLASH; } + virtual LPEPathFlashType pathFlashType() { return SUPPRESS_FLASH; } virtual std::vector<Geom::Path> doEffect_path (std::vector<Geom::Path> const & path_in); diff --git a/src/live_effects/lpe-tangent_to_curve.h b/src/live_effects/lpe-tangent_to_curve.h index 8d9622c67..464b692bf 100644 --- a/src/live_effects/lpe-tangent_to_curve.h +++ b/src/live_effects/lpe-tangent_to_curve.h @@ -38,7 +38,7 @@ public: virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in); - virtual LPEPathFlashType pathFlashType() { return PERMANENT_FLASH; } + virtual LPEPathFlashType pathFlashType() { return SUPPRESS_FLASH; } /* the knotholder entity classes must be declared friends */ friend class TtC::KnotHolderEntityLeftEnd; |
