summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e028f29)
raw | patch | inline | side by side (parent: e028f29)
author | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Fri, 13 Apr 2007 21:02:29 +0000 (21:02 +0000) | ||
committer | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Fri, 13 Apr 2007 21:02:29 +0000 (21:02 +0000) |
src/seltrans.cpp | patch | blob | history |
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index 228b4fec09e68cae07d3eb3d3e269c156ada95c7..3de87ae28e2d343dc7ba18ff0ca34f924fcc633d 100644 (file)
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
@@ -261,7 +261,12 @@ void Inkscape::SelTrans::grab(NR::Point const &p, gdouble x, gdouble y, bool sho
// The selector tool should snap the bbox and the special snappoints, but not path nodes
// (The special points are the handles, center, rotation axis, font baseline, ends of spiral, etc.)
- // First, get all special points for snapping
+ // First, determine the bounding box for snapping ...
+ _bbox = selection->bounds(_snap_bbox_type);
+ _approximate_bbox = selection->bounds(SPItem::APPROXIMATE_BBOX); // Used for correctly scaling the strokewidth
+
+
+ // Next, get all special points for snapping
_snap_points = selection->getSnapPoints(); // Excludes path nodes
std::vector<NR::Point> snap_points_hull = selection->getSnapPointsConvexHull(); // Includes path nodes
if (_snap_points.size() > 100) {
@@ -286,11 +291,6 @@ void Inkscape::SelTrans::grab(NR::Point const &p, gdouble x, gdouble y, bool sho
}
}
- // Next, determine the bounding box for snapping ...
- _bbox = selection->bounds(_snap_bbox_type);
-
- _approximate_bbox = selection->bounds(SPItem::APPROXIMATE_BBOX); // Used for correctly scaling the strokewidth
-
_bbox_points.clear();
if (_bbox) {
// ... and add the bbox corners to _bbox_points
return;
}
- // First, get all special points for snapping
- std::vector<NR::Point> snap_points_hull = selection->getSnapPointsConvexHull(); // Includes path nodes
- // Find bbox hulling all special points, which excludes stroke width. Here we need to include the
- // path nodes, for example because a rectangle which has been converted to a path doesn't have
- // any other special points
- NR::Rect snap_points_bbox;
- if ( snap_points_hull.empty() == false ) {
- std::vector<NR::Point>::iterator i = snap_points_hull.begin();
- snap_points_bbox = NR::Rect(*i, *i);
- i++;
- while (i != snap_points_hull.end()) {
- snap_points_bbox.expandTo(*i);
- i++;
- }
- }
-
- // Next, determine the bounding box for snapping ...
+ //Update the bboxes
_bbox = selection->bounds(_snap_bbox_type);
_approximate_bbox = selection->bounds(SPItem::APPROXIMATE_BBOX);