summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-11-12 00:12:35 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-11-12 00:12:35 +0000
commit7ff4799d9ecde4286c94e76f4005e18db5a60055 (patch)
treeb9a1679f48734df8b07e572e76c5a4c63fd25092 /src
parentAdd a few more tests (diff)
downloadinkscape-7ff4799d9ecde4286c94e76f4005e18db5a60055.tar.gz
inkscape-7ff4799d9ecde4286c94e76f4005e18db5a60055.zip
Fixed bug in node point selection to LPE.
(bzr r13704)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/effect.cpp9
-rw-r--r--src/ui/tools/node-tool.cpp2
2 files changed, 7 insertions, 4 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index ca3b29b66..e49a15dd0 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -413,12 +413,15 @@ bool
Effect::isNodePointSelected(Geom::Point const &nodePoint) const
{
if (selectedNodesPoints.size() > 0) {
+ using Geom::X;
+ using Geom::Y;
for (std::vector<Geom::Point>::const_iterator i = selectedNodesPoints.begin();
i != selectedNodesPoints.end(); ++i) {
Geom::Point p = *i;
- p[Geom::X] = Inkscape::Util::Quantity::convert(p[Geom::X], "px", *defaultUnit);
- p[Geom::Y] = Inkscape::Util::Quantity::convert(p[Geom::Y], "px", *defaultUnit);
- if (Geom::are_near(p, nodePoint, 0.01)) {
+ Geom::Affine transformCoordinate = sp_lpe_item->i2dt_affine();
+ Geom::Point p2(nodePoint[X],nodePoint[Y]);
+ p2 *= transformCoordinate;
+ if (Geom::are_near(p, p2, 0.01)) {
return true;
}
}
diff --git a/src/ui/tools/node-tool.cpp b/src/ui/tools/node-tool.cpp
index 99d60e2b7..838c2a884 100644
--- a/src/ui/tools/node-tool.cpp
+++ b/src/ui/tools/node-tool.cpp
@@ -310,7 +310,7 @@ void NodeTool::update_helperpath () {
for (Inkscape::UI::ControlPointSelection::Set::iterator i = selectionNodes.begin(); i != selectionNodes.end(); ++i) {
if ((*i)->selected()) {
Inkscape::UI::Node *n = dynamic_cast<Inkscape::UI::Node *>(*i);
- selectedNodesPositions.push_back(desktop->doc2dt(n->position()));
+ selectedNodesPositions.push_back(n->position());
}
}
lpe->setSelectedNodePoints(selectedNodesPositions);