diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-06-18 22:58:42 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2016-06-18 22:58:42 +0000 |
| commit | 6820ee49d69cd419c5e8d3c9de74b0552758c842 (patch) | |
| tree | 9d28789e1c620584983d48e28d6afe8411f396d6 /src/live_effects/effect.cpp | |
| parent | fixing bug moving nodes (diff) | |
| download | inkscape-6820ee49d69cd419c5e8d3c9de74b0552758c842.tar.gz inkscape-6820ee49d69cd419c5e8d3c9de74b0552758c842.zip | |
Fixes when moves a path
(bzr r13645.1.163)
Diffstat (limited to 'src/live_effects/effect.cpp')
| -rw-r--r-- | src/live_effects/effect.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 7b36e30f9..5ac5e2407 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -421,6 +421,9 @@ Effect::getSelectedNodes() { size_t counter = 0; std::vector<size_t> result; + if (pathvector_before_effect.empty()){ + return result; + } for (size_t i = 0; i < pathvector_before_effect.size(); i++) { for (size_t j = 0; j < pathvector_before_effect[i].size_closed(); j++) { if ((!pathvector_before_effect[i].closed() && @@ -440,15 +443,11 @@ Effect::getSelectedNodes() bool Effect::isNodeSelected(Geom::Point const &node_point) const { - if (_selected_nodes_pos.size() > 0) { - using Geom::X; - using Geom::Y; - Geom::Affine transformCoordinate = sp_lpe_item->i2dt_affine(); + if (!_selected_nodes_pos.empty()) { for (std::vector<Geom::Point>::const_iterator i = _selected_nodes_pos.begin(); i != _selected_nodes_pos.end(); ++i) { - Geom::Point p = *i; - Geom::Point p2(node_point[X],node_point[Y]); - p2 *= transformCoordinate; + Geom::Point p = (*i); + Geom::Point p2(node_point[Geom::X],node_point[Geom::Y]); if (Geom::are_near(p, p2, 0.01)) { return true; } |
