summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-08-18 00:38:54 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-08-18 00:38:54 +0000
commit0c3056b8e1034be86e7d2a12f9abecc05bba1ddb (patch)
treee67ac9df05b53e6d08293a9e5c77d6484b0b0aa5 /src
parentSince we know what the parent context is we don't need to check whether it ha... (diff)
downloadinkscape-0c3056b8e1034be86e7d2a12f9abecc05bba1ddb.tar.gz
inkscape-0c3056b8e1034be86e7d2a12f9abecc05bba1ddb.zip
Use the visible curve (instead of original curve when a LPE is applied) for testing whether we are over stroke; TODO: we must check whether this is also the right thing to do in all other circumstanced (e.g., when editing in node tool)
(bzr r6660)
Diffstat (limited to 'src')
-rw-r--r--src/shape-editor.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp
index 3575d3405..b26b117ca 100644
--- a/src/shape-editor.cpp
+++ b/src/shape-editor.cpp
@@ -30,6 +30,7 @@
#include "style.h"
#include "display/curve.h"
#include <2geom/pathvector.h>
+#include "sp-shape.h"
#include "shape-editor.h"
@@ -351,7 +352,12 @@ bool ShapeEditor::is_over_stroke (NR::Point event_p, bool remember) {
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);