summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b150ed6)
raw | patch | inline | side by side (parent: b150ed6)
author | cilix42 <cilix42@users.sourceforge.net> | |
Mon, 18 Aug 2008 00:38:54 +0000 (00:38 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Mon, 18 Aug 2008 00:38:54 +0000 (00:38 +0000) |
src/shape-editor.cpp | patch | blob | history |
diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp
index 3575d3405148372ad10240780cc37e8cac58c91c..b26b117cae1bea838c07591b88b32bfddcf87b9b 100644 (file)
--- a/src/shape-editor.cpp
+++ b/src/shape-editor.cpp
#include "style.h"
#include "display/curve.h"
#include <2geom/pathvector.h>
+#include "sp-shape.h"
#include "shape-editor.h"
this->curvepoint_doc = desktop->w2d(event_p);
this->curvepoint_doc *= sp_item_dt2i_affine(item);
- SPCurve *curve = this->nodepath->curve; // not sure if np->curve is always up to date...
+ SPCurve *curve;
+ if (SP_IS_SHAPE(item)) {
+ curve = sp_shape_get_curve(SP_SHAPE(item));
+ } else {
+ this->nodepath->curve; // not sure if np->curve is always up to date...
+ }
Geom::PathVector const &pathv = curve->get_pathvector();
Geom::PathVectorPosition pvpos = Geom::nearestPoint(pathv, this->curvepoint_doc);