diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-06-10 12:35:36 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-06-10 12:35:36 +0000 |
| commit | 9df0d95cbecfc05c9c4fbe7bd51a6b744c5c56a5 (patch) | |
| tree | 7f79bec201fa7fac6dab847dcf497091ad174404 /src/knotholder.cpp | |
| parent | fix compile (diff) | |
| download | inkscape-9df0d95cbecfc05c9c4fbe7bd51a6b744c5c56a5.tar.gz inkscape-9df0d95cbecfc05c9c4fbe7bd51a6b744c5c56a5.zip | |
Write all effect parameters to SVG when a LPE knotholder handle is ungrabbed
(bzr r5870)
Diffstat (limited to 'src/knotholder.cpp')
| -rw-r--r-- | src/knotholder.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/knotholder.cpp b/src/knotholder.cpp index 1ca280d48..f78198275 100644 --- a/src/knotholder.cpp +++ b/src/knotholder.cpp @@ -29,6 +29,7 @@ #include "box3d.h" #include "sp-pattern.h" #include "style.h" +#include "live_effects/lpeobject.h" #include "xml/repr.h" // for debugging only @@ -165,6 +166,17 @@ KnotHolder::knot_ungrabbed_handler(SPKnot *knot) /* do cleanup tasks (e.g., for LPE items write the parameter values * that were changed by dragging the handle to SVG) */ + if (SP_IS_LPE_ITEM(item)) { + // This writes all parameters to SVG. Is this sufficiently efficient or should we only write + // the ones that were changed (e.g., via the individual handles' onKnotUngrabbed() method? + Inkscape::LivePathEffect::Effect *lpe = sp_lpe_item_get_current_lpe(SP_LPE_ITEM(item)); + if (lpe) { + LivePathEffectObject *lpeobj = lpe->getLPEObj(); + SP_OBJECT(lpeobj)->updateRepr(); + } + } + // this was once used to write individual parameter values to SVG but this is now done globally above; + // we leave the calls to onKnotUngrabbed, anyway, in case any other cleanup tasks need to be done for(std::list<KnotHolderEntity *>::iterator i = this->entity.begin(); i != this->entity.end(); ++i) { KnotHolderEntity *e = *i; if (e->knot == knot) { |
