summaryrefslogtreecommitdiffstats
path: root/src/ui/clipboard.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2008-08-07 19:32:35 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2008-08-07 19:32:35 +0000
commit8472f4c7ca3840f6ea097ec30a4102d302c16219 (patch)
tree9641bd16bb2da89fce53f3e67cd997a216ccda8d /src/ui/clipboard.cpp
parentchange javafx output to 1.0 compiler syntax (diff)
downloadinkscape-8472f4c7ca3840f6ea097ec30a4102d302c16219.tar.gz
inkscape-8472f4c7ca3840f6ea097ec30a4102d302c16219.zip
Fix regression in object snapper which caused self-snapping
(bzr r6587)
Diffstat (limited to 'src/ui/clipboard.cpp')
-rw-r--r--src/ui/clipboard.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index e7f2d82ee..ce506523a 100644
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
@@ -787,10 +787,10 @@ void ClipboardManagerImpl::_pasteDocument(SPDocument *clipdoc, bool in_place)
sp_document_ensure_up_to_date(target_document); // What does this do?
boost::optional<NR::Rect> sel_bbox = selection->bounds(); //In desktop coordinates
- // PS: We could also have used the min/max corners calculated above, because we know that
- // after pasting the upper left corner of the selection will be aligend to the corresponding page corner
- // Using the boundingbox of the selection is more foolproof though
- if (sel_bbox) {
+ // PS: We could also have used the min/max corners calculated above, instead of selection->bounds() because
+ // we know that after pasting the upper left corner of the selection will be aligend to the corresponding
+ // page corner. Using the boundingbox of the selection is more foolproof though
+ if (sel_bbox) {
Geom::Point pos_mouse = to_2geom(desktop->point()); //Location of mouse pointer in desktop coordinates
// Now calculate how far we would have to move the pasted objects to get their
// midpoint at the location of the mouse pointer
@@ -803,7 +803,7 @@ void ClipboardManagerImpl::_pasteDocument(SPDocument *clipdoc, bool in_place)
offset = rel_pos_original;
} else { // Stick to the grid if snapping is enabled, otherwise paste at mouse position;
SnapManager &m = desktop->namedview->snap_manager;
- m.setup(NULL, NULL); //Don't display snapindicator
+ m.setup(NULL, NULL); //Don't display the snapindicator
offset = rel_pos_original + m.multipleOfGridPitch(rel_pos_mouse - rel_pos_original);
}