diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2007-08-04 09:10:17 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2007-08-04 09:10:17 +0000 |
| commit | 5753fd8392dbfa06c3c808b5248d008d008a02c8 (patch) | |
| tree | 092333efec8e95ee0c3193c505eda87fdfca21c5 /src/selection.cpp | |
| parent | setting of attributes and default values for feColorMatrix. (diff) | |
| download | inkscape-5753fd8392dbfa06c3c808b5248d008d008a02c8.tar.gz inkscape-5753fd8392dbfa06c3c808b5248d008d008a02c8.zip | |
Make snapping to the item's transformation center optional, but not yet available in the snapping preferences dialog
(bzr r3365)
Diffstat (limited to 'src/selection.cpp')
| -rw-r--r-- | src/selection.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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<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 { +std::vector<NR::Point> Selection::getSnapPoints(bool includeItemCenter) const { GSList const *items = const_cast<Selection *>(this)->itemList(); std::vector<NR::Point> p; for (GSList const *iter = items; iter != NULL; iter = iter->next) { @@ -385,7 +385,9 @@ std::vector<NR::Point> 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; |
