diff options
| author | Diederik van Lierop <mailat-signdiedenrezidotnl> | 2010-10-07 20:38:37 +0000 |
|---|---|---|
| committer | Diederik van Lierop <mailat-signdiedenrezidotnl> | 2010-10-07 20:38:37 +0000 |
| commit | ae65480e4089a909a979962fce9265ab44d05b47 (patch) | |
| tree | 7b291b73471e943d18a9943110a076507fc1e11f /src/object-snapper.cpp | |
| parent | German translation update (diff) | |
| download | inkscape-ae65480e4089a909a979962fce9265ab44d05b47.tar.gz inkscape-ae65480e4089a909a979962fce9265ab44d05b47.zip | |
Fix self-snapping when dragging the transformation center of a selection containing multiple items (as reported by LucaDC in LP #607107, comment #30)
(bzr r9817)
Diffstat (limited to 'src/object-snapper.cpp')
| -rw-r--r-- | src/object-snapper.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index f1bdd94d9..b11e857dc 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -229,10 +229,17 @@ void Inkscape::ObjectSnapper::_collectNodes(Inkscape::SnapSourceType const &t, _snapmanager->snapprefs.setSnapIntersectionCS(false); } + // We should not snap a transformation center to any of the centers of the items in the + // current selection (see the comment in SelTrans::centerRequest()) bool old_pref2 = _snapmanager->snapprefs.getIncludeItemCenter(); - if ((*i).item == _snapmanager->getRotationCenterSource()) { - // don't snap to this item's rotation center - _snapmanager->snapprefs.setIncludeItemCenter(false); + if (old_pref2) { + for ( GSList const *itemlist = _snapmanager->getRotationCenterSource(); itemlist != NULL; itemlist = g_slist_next(itemlist) ) { + if ((*i).item == reinterpret_cast<SPItem*>(itemlist->data)) { + // don't snap to this item's rotation center + _snapmanager->snapprefs.setIncludeItemCenter(false); + break; + } + } } sp_item_snappoints(root_item, *_points_to_snap_to, &_snapmanager->snapprefs); |
