From ef88d874ff89882a9222234591b328584a172799 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Wed, 20 Jan 2010 16:31:22 +0100 Subject: Fix path reverse action (Shift+R) in the node tool. (bzr r9003) --- src/ui/tool/path-manipulator.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/ui/tool/path-manipulator.cpp') diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp index 3be332b80..e15349e06 100644 --- a/src/ui/tool/path-manipulator.cpp +++ b/src/ui/tool/path-manipulator.cpp @@ -100,7 +100,6 @@ PathManipulator::PathManipulator(MultiPathManipulator &mpm, SPPath *path, , _show_outline(false) , _lpe_key(lpe_key) { - /* Because curve drag point is always created first, it does not cover nodes */ if (_lpe_key.empty()) { _i2d_transform = sp_item_i2d_affine(SP_ITEM(path)); } else { @@ -651,14 +650,18 @@ void PathManipulator::deleteSegments() } /** Reverse the subpaths that have anything selected. */ -void PathManipulator::reverseSubpaths() +void PathManipulator::reverseSubpaths(bool selected_only) { for (SubpathList::iterator i = _subpaths.begin(); i != _subpaths.end(); ++i) { - for (NodeList::iterator j = (*i)->begin(); j != (*i)->end(); ++j) { - if (j->selected()) { - (*i)->reverse(); - break; // continue with the next subpath + if (selected_only) { + for (NodeList::iterator j = (*i)->begin(); j != (*i)->end(); ++j) { + if (j->selected()) { + (*i)->reverse(); + break; // continue with the next subpath + } } + } else { + (*i)->reverse(); } } } -- cgit v1.2.3