summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/path.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2009-12-08 02:21:08 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2009-12-08 02:21:08 +0000
commite2b9f78d271e5fea988138d49020e704e72c83b1 (patch)
treed5c1c53cefce4a2f126718cdf2d95707309446e5 /src/live_effects/parameter/path.cpp
parentFix mask editing behavior on undo and outline display for masks/clips; (diff)
downloadinkscape-e2b9f78d271e5fea988138d49020e704e72c83b1.tar.gz
inkscape-e2b9f78d271e5fea988138d49020e704e72c83b1.zip
Fix LPEs and break mask transform undo
(bzr r8846.2.3)
Diffstat (limited to 'src/live_effects/parameter/path.cpp')
-rw-r--r--src/live_effects/parameter/path.cpp33
1 files changed, 27 insertions, 6 deletions
diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp
index 93dfd2667..3a03de51c 100644
--- a/src/live_effects/parameter/path.cpp
+++ b/src/live_effects/parameter/path.cpp
@@ -40,6 +40,10 @@
#include "sp-text.h"
#include "display/curve.h"
+#include "ui/tool/node-tool.h"
+#include "ui/tool/multi-path-manipulator.h"
+#include "ui/tool/shape-record.h"
+
namespace Inkscape {
@@ -195,16 +199,33 @@ PathParam::param_newWidget(Gtk::Tooltips * tooltips)
void
PathParam::param_editOncanvas(SPItem * item, SPDesktop * dt)
{
- // TODO this whole method is broken!
+ using namespace Inkscape::UI;
+
+ // TODO remove the tools_switch atrocity.
+ if (!tools_isactive(dt, TOOLS_NODES)) {
+ tools_switch(dt, TOOLS_NODES);
+ }
+
+ InkNodeTool *nt = static_cast<InkNodeTool*>(dt->event_context);
+ std::set<ShapeRecord> shapes;
+ ShapeRecord r;
+
+ r.role = SHAPE_ROLE_LPE_PARAM;
+ r.edit_transform = Geom::identity(); // TODO this is almost certainly wrong
+ if (!href) {
+ r.item = reinterpret_cast<SPItem*>(param_effect->getLPEObj());
+ r.lpe_key = param_key;
+ } else {
+ r.item = ref.getObject();
+ }
+ shapes.insert(r);
+ nt->_multipath->setItems(shapes);
}
void
-PathParam::param_setup_nodepath(Inkscape::NodePath::Path *np)
+PathParam::param_setup_nodepath(Inkscape::NodePath::Path *)
{
- // TODO this too!
- np->show_helperpath = true;
- np->helperpath_rgba = 0x009000ff;
- np->helperpath_width = 1.0;
+ // TODO this method should not exist at all!
}
void