diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2007-03-26 22:29:17 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2007-03-26 22:29:17 +0000 |
| commit | 102c95490212a3f38b299cf2188bdabf00f79a64 (patch) | |
| tree | 1a44a299944311d0ef5ebc62521a08cacea6a87a /src/selection.cpp | |
| parent | fix range, make integer, remove unnecessary document_done, fix 1635388 (diff) | |
| download | inkscape-102c95490212a3f38b299cf2188bdabf00f79a64.tar.gz inkscape-102c95490212a3f38b299cf2188bdabf00f79a64.zip | |
Selector tool shouldn't snap to path nodes, see Bulia's comment in bug #1589436
(bzr r2767)
Diffstat (limited to 'src/selection.cpp')
| -rw-r--r-- | src/selection.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/selection.cpp b/src/selection.cpp index 201661eec..05bd8d030 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -27,6 +27,7 @@ #include "xml/repr.h" #include "sp-shape.h" +#include "sp-path.h" #include <sigc++/functors/mem_fun.h> @@ -367,12 +368,20 @@ NR::Maybe<NR::Point> Selection::center() const { /** * Compute the list of points in the selection that are to be considered for snapping. + * This includes all special points of each item in the selection, except path nodes */ std::vector<NR::Point> Selection::getSnapPoints() const { GSList const *items = const_cast<Selection *>(this)->itemList(); std::vector<NR::Point> p; for (GSList const *iter = items; iter != NULL; iter = iter->next) { - sp_item_snappoints(SP_ITEM(iter->data), SnapPointsIter(p)); + // getSnapPoints() is only being used in the selector tool, which should + // not snap path nodes. Only the node tool should snap those. + SPItem *this_item = SP_ITEM(iter->data); + if (!SP_IS_PATH(this_item)) { + // Only snap if we don't have a path at hand + // (Same check occurs in sp-item-group) + sp_item_snappoints(this_item, SnapPointsIter(p)); + } } return p; |
