From b52865a71a9f83da9719a3ec5f50a4a2cd7cdace Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sun, 10 Jan 2010 01:46:28 +0100 Subject: * Implement node snapping. * Fix minor bug in linear grow. * Add --fixes. * Move some node selection-related functions to ControlPointSelection. Fixed bugs: - https://launchpad.net/bugs/170561 - https://launchpad.net/bugs/171893 - https://launchpad.net/bugs/182585 - https://launchpad.net/bugs/446773 (bzr r8846.2.9) --- src/ui/tool/path-manipulator.cpp | 48 +--------------------------------------- 1 file changed, 1 insertion(+), 47 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 2755d6fb3..cfa3846f8 100644 --- a/src/ui/tool/path-manipulator.cpp +++ b/src/ui/tool/path-manipulator.cpp @@ -214,42 +214,6 @@ void PathManipulator::selectSubpaths() } } -/** Select all nodes in the path. */ -void PathManipulator::selectAll() -{ - for (SubpathList::iterator i = _subpaths.begin(); i != _subpaths.end(); ++i) { - for (NodeList::iterator j = (*i)->begin(); j != (*i)->end(); ++j) { - _selection.insert(j.ptr()); - } - } -} - -/** Select points inside the given rectangle. If all points inside it are already selected, - * they will be deselected. - * @param area Area to select - */ -void PathManipulator::selectArea(Geom::Rect const &area) -{ - bool nothing_selected = true; - std::vector in_area; - for (SubpathList::iterator i = _subpaths.begin(); i != _subpaths.end(); ++i) { - for (NodeList::iterator j = (*i)->begin(); j != (*i)->end(); ++j) { - if (area.contains(j->position())) { - in_area.push_back(j.ptr()); - if (!j->selected()) { - _selection.insert(j.ptr()); - nothing_selected = false; - } - } - } - } - if (nothing_selected) { - for (std::vector::iterator i = in_area.begin(); i != in_area.end(); ++i) { - _selection.erase(*i); - } - } -} - /** Move the selection forward or backward by one node in each subpath, based on the sign * of the parameter. */ void PathManipulator::shiftSelection(int dir) @@ -298,17 +262,6 @@ void PathManipulator::shiftSelection(int dir) } } -/** Invert selection in the entire path. */ -void PathManipulator::invertSelection() -{ - for (SubpathList::iterator i = _subpaths.begin(); i != _subpaths.end(); ++i) { - for (NodeList::iterator j = (*i)->begin(); j != (*i)->end(); ++j) { - if (j->selected()) _selection.erase(j.ptr()); - else _selection.insert(j.ptr()); - } - } -} - /** Invert selection in the selected subpaths. */ void PathManipulator::invertSelectionInSubpaths() { @@ -724,6 +677,7 @@ void PathManipulator::setControlsTransform(Geom::Matrix const &tnew) _createGeometryFromControlPoints(); } +/** Hide the curve drag point until the next motion event. */ void PathManipulator::hideDragPoint() { _dragpoint->setVisible(false); -- cgit v1.2.3