summaryrefslogtreecommitdiffstats
path: root/src/ui/clipboard.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mailat-signdiedenrezidotnl>2010-02-25 21:54:44 +0000
committerDiederik van Lierop <mailat-signdiedenrezidotnl>2010-02-25 21:54:44 +0000
commit6edc17e9611bfc1875cf3fdbaf8fb1ce3c820b89 (patch)
tree9e88824107418e33478f6143ca44b95f607e84d3 /src/ui/clipboard.cpp
parentfix warnings (diff)
downloadinkscape-6edc17e9611bfc1875cf3fdbaf8fb1ce3c820b89.tar.gz
inkscape-6edc17e9611bfc1875cf3fdbaf8fb1ce3c820b89.zip
1) Fix moving by an integer multiple of the grid spacing (<alt>-dragging in the selector tool)
2) Allow constrained translation for 1) (with <ctrl>) 3) Fix snapping to the grid when pasting 4) Show snap indicators for all of the above 5) Implement snap delay mechanism for 1) and 2) (bzr r9113)
Diffstat (limited to 'src/ui/clipboard.cpp')
-rw-r--r--src/ui/clipboard.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index af0ec0129..f213160f4 100644
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
@@ -822,11 +822,12 @@ void ClipboardManagerImpl::_pasteDocument(SPDocument *clipdoc, bool in_place)
if (!in_place) {
SnapManager &m = desktop->namedview->snap_manager;
- m.setup(desktop, false); // Don't display the snapindicator
+ m.setup(desktop);
+ sp_event_context_discard_delayed_snap_event(desktop->event_context);
// get offset from mouse pointer to bbox center, snap to grid if enabled
Geom::Point mouse_offset = desktop->point() - sel_bbox->midpoint();
- offset = m.multipleOfGridPitch(mouse_offset - offset) + offset;
+ offset = m.multipleOfGridPitch(mouse_offset - offset, sel_bbox->midpoint() + offset) + offset;
}
sp_selection_move_relative(selection, offset);