diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-06-18 22:30:36 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-06-18 22:30:36 +0000 |
| commit | 4e8bfe1693fe11e16c7f6aa94348895d94eff3c1 (patch) | |
| tree | e7c3c0b5ce4368cf02ad8ecf825bdb6a60194837 /src/live_effects/effect.cpp | |
| parent | Update LPE helper paths "live" on changes (diff) | |
| download | inkscape-4e8bfe1693fe11e16c7f6aa94348895d94eff3c1.tar.gz inkscape-4e8bfe1693fe11e16c7f6aa94348895d94eff3c1.zip | |
Display helper grid for LPELattice; automatically add helper paths for LPE PathParams
(bzr r5996)
Diffstat (limited to 'src/live_effects/effect.cpp')
| -rw-r--r-- | src/live_effects/effect.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 4e500a498..9326f54b9 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -434,11 +434,21 @@ Effect::addHelperPaths(SPLPEItem *lpeitem, SPDesktop *desktop) // must create the helper curve for the original path manually; once 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); } + for (std::vector<Parameter *>::iterator p = param_vector.begin(); p != param_vector.end(); ++p) { + if ((*p)->paramType() == Inkscape::LivePathEffect::PATH_PARAM) { + SPCurve *c = new SPCurve(static_cast<Inkscape::LivePathEffect::PathParam*>(*p)->get_pathvector()); + + // TODO: factor this out (also the copied code above); see also lpe-lattice.cpp + SPCanvasItem *canvasitem = sp_nodepath_generate_helperpath(desktop, c, SP_ITEM(lpeitem), 0x009000ff); + Inkscape::Display::TemporaryItem* tmpitem = desktop->add_temporary_canvasitem (canvasitem, 0); + lpeitem->lpe_helperpaths.push_back(tmpitem); + } + } + addHelperPathsImpl(lpeitem, desktop); } |
