summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e98da96)
raw | patch | inline | side by side (parent: e98da96)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 28 Mar 2008 19:48:22 +0000 (19:48 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 28 Mar 2008 19:48:22 +0000 (19:48 +0000) |
fix ClipboardManager to construct the svgd from pathvector instead of obtaining the string from PathParam which can be a href instead of svgd
src/live_effects/parameter/path.cpp | patch | blob | history | |
src/live_effects/parameter/path.h | patch | blob | history | |
src/ui/clipboard.cpp | patch | blob | history |
index be26006c7e726f3e3295389c571425091ecbfaea..d7237e54bd2565e5da37a9a5c46440c405ff598f 100644 (file)
shape_editor->set_item_lpe_path_parameter(item, SP_OBJECT(param_effect->getLPEObj()), param_key.c_str());
} else {
// set referred item for editing
+ shape_editor->set_item(ref.getObject());
}
}
@@ -241,6 +242,18 @@ PathParam::param_set_and_write_new_value (Geom::Piecewise<Geom::D2<Geom::SBasis>
must_recalculate_pwd2 = false;
}
+void
+PathParam::param_set_and_write_new_value (std::vector<Geom::Path> const & newpath)
+{
+ remove_link();
+ _pathvector = newpath;
+ must_recalculate_pwd2 = true;
+
+ gchar * svgd = SVGD_from_2GeomPath( _pathvector );
+ param_write_to_repr(svgd);
+ g_free(svgd);
+}
+
void
PathParam::ensure_pwd2()
{
void
PathParam::linked_delete(SPObject */*deleted*/)
{
-// don't know what to do yet. not acting probably crashes inkscape.
- g_message("PathParam::linked_delete");
+ quit_listening();
+ remove_link();
+ param_set_and_write_new_value (_pathvector);
}
void
index 1f2be32c8a605e569bf9ac12828d12d309522cd0..d72b4b7fea30321bc4f6b3db05a2c4a8a838a3ff 100644 (file)
void param_set_default();
void param_set_and_write_default();
void param_set_and_write_new_value (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & newpath);
+ void param_set_and_write_new_value (std::vector<Geom::Path> const & newpath);
virtual void param_editOncanvas(SPItem * item, SPDesktop * dt);
virtual void param_setup_nodepath(Inkscape::NodePath::Path *np);
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index 842f10d521db01666d5a00f4b879c2da511ddce1..4ee838708dc7e75440c591e1c32de814d8a0eed5 100644 (file)
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
#include "text-context.h"
#include "text-editing.h"
#include "tools-switch.h"
+#include "live_effects/n-art-bpath-2geom.h"
/// @brief Made up mimetype to represent Gdk::Pixbuf clipboard contents
#define CLIPBOARD_GDK_PIXBUF_TARGET "image/x-gdk-pixbuf"
void ClipboardManagerImpl::copyPathParameter(Inkscape::LivePathEffect::PathParam *pp)
{
if ( pp == NULL ) return;
- gchar *svgd = pp->param_writeSVGValue();
+ gchar *svgd = SVGD_from_2GeomPath( pp->get_pathvector() );
if ( svgd == NULL || *svgd == '\0' ) return;
_discardInternalClipboard();