From 5753fd8392dbfa06c3c808b5248d008d008a02c8 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sat, 4 Aug 2007 09:10:17 +0000 Subject: Make snapping to the item's transformation center optional, but not yet available in the snapping preferences dialog (bzr r3365) --- src/selection.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/selection.cpp') diff --git a/src/selection.cpp b/src/selection.cpp index 2b143dd5a..ca3de5927 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -371,7 +371,7 @@ NR::Maybe 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 Selection::getSnapPoints() const { +std::vector Selection::getSnapPoints(bool includeItemCenter) const { GSList const *items = const_cast(this)->itemList(); std::vector p; for (GSList const *iter = items; iter != NULL; iter = iter->next) { @@ -385,7 +385,9 @@ std::vector Selection::getSnapPoints() const { } //Include the transformation origin for snapping //For a group only the group's origin is considered - p.push_back(this_item->getCenter()); + if (includeItemCenter) { + p.push_back(this_item->getCenter()); + } } return p; -- cgit v1.2.3