summaryrefslogtreecommitdiffstats
path: root/src/seltrans.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2007-11-18 19:14:14 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2007-11-18 19:14:14 +0000
commit442bc01e1a2fc6f7e59fd6b8e70d609d3d0cce6d (patch)
tree9353857defadc3d3d38cf4f32f72541b5649c6e5 /src/seltrans.cpp
parentrename EditCloneOriginal to EditCloneSelectOriginal (diff)
downloadinkscape-442bc01e1a2fc6f7e59fd6b8e70d609d3d0cce6d.tar.gz
inkscape-442bc01e1a2fc6f7e59fd6b8e70d609d3d0cce6d.zip
1) Improving snapping logic 2) When skewing, don't snap to selection itself
(bzr r4111)
Diffstat (limited to 'src/seltrans.cpp')
-rw-r--r--src/seltrans.cpp12
1 files changed, 10 insertions, 2 deletions
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<SPItem const*> it;
+ for (GSList const *i = _selection->itemList(); i != NULL; i = i->next) {
+ it.push_back(reinterpret_cast<SPItem*>(i->data));
+ }
+
SnapManager const &m = _desktop->namedview->snap_manager;
std::pair<NR::Coord, bool> bb = m.freeSnapSkew(Inkscape::Snapper::SNAPPOINT_BBOX,
_bbox_points,
- std::list<SPItem const *>(),
+ it,
skew[dim_a],
_origin_for_bboxpoints,
dim_b);
std::pair<NR::Coord, bool> sn = m.freeSnapSkew(Inkscape::Snapper::SNAPPOINT_NODE,
_snap_points,
- std::list<SPItem const *>(),
+ it,
skew[dim_a],
_origin_for_specpoints,
dim_b);