From 442bc01e1a2fc6f7e59fd6b8e70d609d3d0cce6d Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sun, 18 Nov 2007 19:14:14 +0000 Subject: 1) Improving snapping logic 2) When skewing, don't snap to selection itself (bzr r4111) --- src/seltrans.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/seltrans.cpp') diff --git a/src/seltrans.cpp b/src/seltrans.cpp index 3650b18b6..512d2c0ca 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -1151,18 +1151,26 @@ gboolean Inkscape::SelTrans::skewRequest(SPSelTransHandle const &handle, NR::Poi } skew[dim_a] = tan(radians) * s[dim_a]; } else { + /* Get a STL list of the selected items. + ** FIXME: this should probably be done by Inkscape::Selection. + */ + std::list it; + for (GSList const *i = _selection->itemList(); i != NULL; i = i->next) { + it.push_back(reinterpret_cast(i->data)); + } + SnapManager const &m = _desktop->namedview->snap_manager; std::pair bb = m.freeSnapSkew(Inkscape::Snapper::SNAPPOINT_BBOX, _bbox_points, - std::list(), + it, skew[dim_a], _origin_for_bboxpoints, dim_b); std::pair sn = m.freeSnapSkew(Inkscape::Snapper::SNAPPOINT_NODE, _snap_points, - std::list(), + it, skew[dim_a], _origin_for_specpoints, dim_b); -- cgit v1.2.3