summaryrefslogtreecommitdiffstats
path: root/src/ui/tool/path-manipulator.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-10-02 22:15:00 +0000
committerJabiertxof <jtx@jtx.marker.es>2013-10-02 22:15:00 +0000
commitaa6d389286f6402ef393015b000755bc3124362a (patch)
tree81e17d682f5aade76e44bc8809e751b42dd5f773 /src/ui/tool/path-manipulator.cpp
parentFixed a bug editing paths in others LPE -envelope- (diff)
parentFix segment welding in the node tool hanging when a two-point segment (diff)
downloadinkscape-aa6d389286f6402ef393015b000755bc3124362a.tar.gz
inkscape-aa6d389286f6402ef393015b000755bc3124362a.zip
update to trunk
(bzr r11950.1.158)
Diffstat (limited to 'src/ui/tool/path-manipulator.cpp')
-rw-r--r--src/ui/tool/path-manipulator.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp
index 910f75258..10e50a970 100644
--- a/src/ui/tool/path-manipulator.cpp
+++ b/src/ui/tool/path-manipulator.cpp
@@ -478,7 +478,10 @@ void PathManipulator::weldSegments()
if (j->selected()) ++num_selected;
else ++num_unselected;
}
- if (num_selected < 3) continue;
+
+ // if 2 or fewer nodes are selected, there can't be any middle points to remove.
+ if (num_selected <= 2) continue;
+
if (num_unselected == 0 && sp->closed()) {
// if all nodes in a closed subpath are selected, the operation doesn't make much sense
continue;
@@ -508,14 +511,16 @@ void PathManipulator::weldSegments()
}
if (num_points > 2) {
// remove nodes in the middle
+ // TODO: fit bezier to the former shape
sel_beg = sel_beg.next();
while (sel_beg != sel_end.prev()) {
NodeList::iterator next = sel_beg.next();
sp->erase(sel_beg);
sel_beg = next;
}
- sel_beg = sel_end;
}
+ sel_beg = sel_end;
+ // decrease num_selected by the number of points processed
num_selected -= num_points;
}
}