From 031c9271f8126586d050a273aed917eee58d278a Mon Sep 17 00:00:00 2001 From: dvlierop2 Date: Wed, 25 Jul 2007 12:07:39 +0000 Subject: [PATCH] Snapping the transformation origin should also work for paths, not only for shapes --- src/selection.cpp | 4 ++++ src/sp-item.cpp | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/selection.cpp b/src/selection.cpp index 44f601362..2b143dd5a 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -28,6 +28,7 @@ #include "sp-shape.h" #include "sp-path.h" +#include "sp-item-group.h" #include @@ -382,6 +383,9 @@ std::vector Selection::getSnapPoints() const { // (Same check occurs in sp-item-group) sp_item_snappoints(this_item, SnapPointsIter(p)); } + //Include the transformation origin for snapping + //For a group only the group's origin is considered + p.push_back(this_item->getCenter()); } return p; diff --git a/src/sp-item.cpp b/src/sp-item.cpp index 469b95222..309c42c90 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -787,8 +787,6 @@ void sp_item_snappoints(SPItem const *item, SnapPointsIter p) if (item_class.snappoints) { item_class.snappoints(item, p); } - - *p = item->getCenter(); } void -- 2.30.2