summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 94f2e71)
raw | patch | inline | side by side (parent: 94f2e71)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Sun, 20 Jul 2008 18:41:27 +0000 (18:41 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Sun, 20 Jul 2008 18:41:27 +0000 (18:41 +0000) |
src/nodepath.cpp | patch | blob | history |
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index d7ca69112257d1e611070d603d5e95a90ab6555b..023f931f21b192834737fee934809f24a75a3f97 100644 (file)
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
#include "live_effects/lpeobject.h"
#include "live_effects/effect.h"
#include "live_effects/parameter/parameter.h"
+#include "live_effects/parameter/path.h"
#include "util/mathfns.h"
#include "display/snap-indicator.h"
#include "snapped-point.h"
sp_shape_set_curve(SP_SHAPE(np->object), curve, true);
}
} else if ( IS_LIVEPATHEFFECT(np->object) ) {
- // FIXME: this writing to string and then reading from string is bound to be slow.
- // create a method to convert from curve directly to 2geom...
- gchar *svgpath = sp_svg_write_path( np->curve->get_pathvector() );
- LIVEPATHEFFECT(np->object)->lpe->setParameter(np->repr_key, svgpath);
- g_free(svgpath);
-
- np->object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+ Inkscape::LivePathEffect::PathParam *pathparam = dynamic_cast<Inkscape::LivePathEffect::PathParam *>( LIVEPATHEFFECT(np->object)->lpe->getParameter(np->repr_key) );
+ if (pathparam) {
+ pathparam->set_new_value(np->curve->get_pathvector(), false); // do not write to SVG
+ np->object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+ }
}
}